cb730bee8708a7fd2d24e9eb595253930a6165cd
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-12-03  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Revert the inadvertently committed change.
4
5         * html/HTMLElement.idl:
6
7 2013-12-03  Ryosuke Niwa  <rniwa@webkit.org>
8
9         Remove nodeIsDetachedFromDocument and visualWordMovementEnabled in FrameSelection
10         https://bugs.webkit.org/show_bug.cgi?id=125210
11
12         Reviewed by Antti Koivisto.
13
14         Inspired by https://chromium.googlesource.com/chromium/blink/+/92409870f0ff8fafe31217830db0838a9e1ffb98
15
16         Removed some unused code.
17
18         * editing/FrameSelection.cpp:
19         (WebCore::FrameSelection::textWasReplaced):
20         * editing/FrameSelection.h:
21         * page/Settings.in:
22
23 2013-12-03  Ryosuke Niwa  <rniwa@webkit.org>
24
25         Potential crash in RenderView::selectionBounds and RenderView::repaintSelection
26         https://bugs.webkit.org/show_bug.cgi?id=125207
27
28         Reviewed by Simon Fraser.
29         
30         Merge https://chromium.googlesource.com/chromium/blink/+/f9e6e288a5aa959f05c374806121aaf0fc52d440
31
32         Update style in FrameSelection instead of RenderView's member functions. These are the last two
33         member functions of RenderView that updates the style.
34
35         * editing/FrameSelection.cpp:
36         (WebCore::FrameSelection::focusedOrActiveStateChanged):
37         (WebCore::FrameSelection::bounds):
38         * rendering/RenderView.cpp:
39         (WebCore::RenderView::selectionBounds):
40         (WebCore::RenderView::repaintSelection):
41
42 2013-12-03  Mark Rowe  <mrowe@apple.com>
43
44         <https://webkit.org/b/125143> Improve the formatting in the generated Objective-C headers.
45
46         Add a space between @property and any parenthesized attributes.
47         Prefer strong over retain when specifying memory management semantics.
48
49         Reviewed by Darin Adler.
50
51         * bindings/objc/PublicDOMInterfaces.h:
52         * bindings/scripts/CodeGeneratorObjC.pm:
53         (GetPropertyAttributes): Generate strong instead of retain. Include a
54         space before the parenthesis.
55         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
56         * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
57         * bindings/scripts/test/ObjC/DOMTestException.h:
58         * bindings/scripts/test/ObjC/DOMTestInterface.h:
59         * bindings/scripts/test/ObjC/DOMTestObj.h:
60         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
61         * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
62         * bindings/scripts/test/ObjC/DOMattribute.h:
63
64 2013-12-03  Alexey Proskuryakov  <ap@apple.com>
65
66         Update WebCrypto JWK mapping to newer proposal
67         https://bugs.webkit.org/show_bug.cgi?id=124218
68
69         Reviewed by Anders Carlsson.
70
71         Tests: crypto/subtle/jwk-export-use-values.html
72                crypto/subtle/jwk-import-use-values.html
73
74         1. "extractable" renamed to "ext" in JWK.
75         2. New values for "use" mapping, which can now be combined into comma separated lists,
76         and cover all possible WebCrypto usages.
77
78         * bindings/js/JSCryptoKeySerializationJWK.cpp:
79         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
80         (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable):
81         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
82         (WebCore::processUseValue):
83         (WebCore::JSCryptoKeySerializationJWK::addJWKUseToJSON):
84         (WebCore::JSCryptoKeySerializationJWK::serialize):
85
86 2013-12-03  Simon Fraser  <simon.fraser@apple.com>
87
88         Remove some iOS-related documentScale code
89         https://bugs.webkit.org/show_bug.cgi?id=125194
90
91         Reviewed by Enrica Casucci.
92
93         Remove exports of nonexistent documentScale-related functions on Frame.
94
95         * WebCore.exp.in:
96
97 2013-12-03  Eric Carlson  <eric.carlson@apple.com>
98
99         Fix regression caused by r158599
100         https://bugs.webkit.org/show_bug.cgi?id=125188
101
102         Reviewed by Jer Noble.
103
104         * html/HTMLMediaElement.cpp:
105         (HTMLMediaElement::clearMediaPlayer): Do not clear m_player when PLUGIN_PROXY_FOR_VIDEO
106             is enabled.
107
108 2013-12-03  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
109
110         Nix Upstream: Updating WebCore files
111         https://bugs.webkit.org/show_bug.cgi?id=124981
112
113         Reviewed by Benjamin Poulain.
114
115         Just to sync our github repo files and the trunk, as part of the upstream process
116
117         No new tests needed.
118
119         * PlatformNix.cmake:
120         * css/mediaControlsNix.css:
121         (audio):
122         (video::-webkit-media-controls):
123         (audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure):
124         (video::-webkit-media-controls-enclosure):
125         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
126         (video:-webkit-full-page-media):
127         (audio:-webkit-full-page-media, video:-webkit-full-page-media):
128         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
129         (audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button):
130         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
131         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
132         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
133         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
134         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
135         (input[type="range"]::-webkit-media-slider-container):
136         (input[type="range"]::-webkit-media-slider-container > div):
137         (input[type="range"]::-webkit-media-slider-thumb):
138         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
139         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
140         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
141         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
142         (audio::-webkit-media-controls-fullscreen-volume-slider, video::-webkit-media-controls-fullscreen-volume-slider):
143         (audio::-webkit-media-controls-fullscreen-volume-min-button, video::-webkit-media-controls-fullscreen-volume-min-button):
144         (audio::-webkit-media-controls-fullscreen-volume-max-button, video::-webkit-media-controls-fullscreen-volume-max-button):
145         (video::-webkit-media-text-track-container):
146         (video::cue):
147         (video::-webkit-media-text-track-region):
148         (video::-webkit-media-text-track-region-container):
149         (video::-webkit-media-text-track-region-container.scrolling):
150         (video::-webkit-media-text-track-display):
151         (video::cue(:future)):
152         (video::-webkit-media-text-track-container b):
153         (video::-webkit-media-text-track-container u):
154         (video::-webkit-media-text-track-container i):
155         * editing/Editor.cpp:
156         (WebCore::Editor::cut):
157         (WebCore::Editor::copy):
158         (WebCore::Editor::copyImage):
159         * editing/Editor.h:
160         * html/HTMLCanvasElement.h:
161         * platform/Cursor.h:
162         * platform/audio/FFTFrame.h:
163         * platform/audio/nix/AudioBusNix.cpp:
164         (WebCore::AudioBus::loadPlatformResource):
165         * platform/graphics/GLContext.h:
166         * platform/nix/CursorNix.cpp:
167         (WebCore::Cursor::ensurePlatformCursor):
168         * platform/nix/GamepadsNix.cpp:
169         (WebCore::sampleGamepads):
170         * platform/nix/RenderThemeNix.cpp:
171         (WebCore::toIntSize):
172         (WebCore::toNixRect):
173         (WebCore::RenderThemeNix::platformActiveSelectionBackgroundColor):
174         (WebCore::RenderThemeNix::platformInactiveSelectionBackgroundColor):
175         (WebCore::RenderThemeNix::platformActiveSelectionForegroundColor):
176         (WebCore::RenderThemeNix::platformInactiveSelectionForegroundColor):
177         (WebCore::RenderThemeNix::platformActiveListBoxSelectionBackgroundColor):
178         (WebCore::RenderThemeNix::platformInactiveListBoxSelectionBackgroundColor):
179         (WebCore::RenderThemeNix::platformActiveListBoxSelectionForegroundColor):
180         (WebCore::RenderThemeNix::platformInactiveListBoxSelectionForegroundColor):
181         (WebCore::RenderThemeNix::platformActiveTextSearchHighlightColor):
182         (WebCore::RenderThemeNix::platformInactiveTextSearchHighlightColor):
183         (WebCore::RenderThemeNix::platformFocusRingColor):
184         (WebCore::RenderThemeNix::platformTapHighlightColor):
185         (WebCore::RenderThemeNix::paintButton):
186         (WebCore::RenderThemeNix::paintTextField):
187         (WebCore::RenderThemeNix::paintCheckbox):
188         (WebCore::RenderThemeNix::setCheckboxSize):
189         (WebCore::RenderThemeNix::paintRadio):
190         (WebCore::RenderThemeNix::setRadioSize):
191         (WebCore::RenderThemeNix::paintMenuList):
192         (WebCore::RenderThemeNix::paintProgressBar):
193         (WebCore::RenderThemeNix::paintSliderTrack):
194         (WebCore::RenderThemeNix::paintSliderThumb):
195         (WebCore::RenderThemeNix::paintInnerSpinButton):
196         (WebCore::RenderThemeNix::paintMeter):
197         (WebCore::RenderThemeNix::extraMediaControlsStyleSheet):
198         (WebCore::RenderThemeNix::paintMediaPlayButton):
199         (WebCore::RenderThemeNix::paintMediaMuteButton):
200         (WebCore::RenderThemeNix::paintMediaSeekBackButton):
201         (WebCore::RenderThemeNix::paintMediaSeekForwardButton):
202         (WebCore::RenderThemeNix::paintMediaSliderTrack):
203         (WebCore::RenderThemeNix::paintMediaVolumeSliderContainer):
204         (WebCore::RenderThemeNix::paintMediaVolumeSliderTrack):
205         (WebCore::RenderThemeNix::paintMediaRewindButton):
206         * platform/nix/RenderThemeNix.h:
207         * rendering/SimpleLineLayout.cpp:
208         (WebCore::SimpleLineLayout::canUseFor):
209
210 2013-12-03  Ralph Thomas  <ralpht@gmail.com>
211
212         Typo: FixedPositionConstaint -> FixedPositionConstraint
213         https://bugs.webkit.org/show_bug.cgi?id=125171
214
215         Reviewed by Simon Fraser.
216
217         No new tests, no change in behavior.
218
219         * page/scrolling/ScrollingConstraints.h:
220         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
221         (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode):
222         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
223         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
224
225 2013-12-03  Samuel White  <samuel_white@apple.com>
226
227         AXPress event coordinates are always sent as (0, 0)
228         https://bugs.webkit.org/show_bug.cgi?id=76677
229
230         Reviewed by Simon Fraser.
231
232         Set the coordinates of a simulated press equal to the center of the target
233         element when the simulated press does not have a related mouse event.
234
235         Test: accessibility/press-targets-center-point.html
236
237         * dom/Element.cpp:
238         (WebCore::Element::clientRect):
239         (WebCore::Element::screenRect):
240         * dom/Element.h:
241         * dom/EventDispatcher.cpp:
242         (WebCore::EventDispatcher::dispatchSimulatedClick):
243         * dom/MouseEvent.cpp:
244         (WebCore::SimulatedMouseEvent::create):
245         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
246         * dom/MouseEvent.h:
247
248 2013-12-03  Dean Jackson  <dino@apple.com>
249
250         [WebGL] Implement OES texture float linear
251         https://bugs.webkit.org/show_bug.cgi?id=124871
252
253         Reviewed by Brent Fulgham.
254
255         Implement the OES_texture_float_linear extension. Generally
256         we'd also enable OES_texture_half_float_linear at the same
257         time, but that's blocked on webkit.org/b/110936.
258
259         Test: fast/canvas/webgl/oes-texture-float-linear.html
260
261         * CMakeLists.txt: Add new files.
262         * DerivedSources.cpp: Ditto.
263         * DerivedSources.make: Generate new file from IDL.
264         * GNUmakefile.list.am: Add new files.
265         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
266         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
267         * WebCore.xcodeproj/project.pbxproj: New files for OESTextureFloatLinear.
268
269         * bindings/js/JSWebGLRenderingContextCustom.cpp:
270         (WebCore::toJS): Map the new name into the appropriate type.
271
272         * html/canvas/OESTextureFloatLinear.cpp: Added. This is a very simple class
273         that's mostly empty.
274         (WebCore::OESTextureFloatLinear::OESTextureFloatLinear):
275         (WebCore::OESTextureFloatLinear::~OESTextureFloatLinear):
276         (WebCore::OESTextureFloatLinear::getName):
277         (WebCore::OESTextureFloatLinear::create):
278         * html/canvas/OESTextureFloatLinear.h: Added.
279         * html/canvas/OESTextureFloatLinear.idl: Added.
280
281         * html/canvas/WebGLExtension.h: Declare the new name in the enum of extensions.
282
283         * html/canvas/WebGLRenderingContext.cpp:
284         (WebCore::WebGLRenderingContext::drawArrays): Call new name.
285         (WebCore::WebGLRenderingContext::drawElements): Call new name.
286         (WebCore::WebGLRenderingContext::getExtension): Create the new extension if asked.
287         (WebCore::WebGLRenderingContext::checkTextureCompleteness): Renamed from handleNPOTTextures. Now
288         checks for the type of the texture too.
289         * html/canvas/WebGLRenderingContext.h: Member variable for new extension.
290
291         * html/canvas/WebGLTexture.cpp:
292         (WebCore::WebGLTexture::WebGLTexture):
293         (WebCore::WebGLTexture::needToUseBlackTexture): Takes an extra parameter which indicates
294         if it has an extension enabled.
295         (WebCore::WebGLTexture::update): Note it is a float type when updating.
296         * html/canvas/WebGLTexture.h: New flag to indicate float type.
297
298         * platform/graphics/Extensions3D.h: New flag type.
299         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
300         (WebCore::Extensions3DOpenGL::supportsExtension): Add a comment about the extension.
301
302 2013-12-03  Alexey Proskuryakov  <ap@apple.com>
303
304         Support exporting private WebCrypto RSA keys
305         https://bugs.webkit.org/show_bug.cgi?id=124483
306
307         Reviewed by Anders Carlsson.
308
309         Test: crypto/subtle/rsa-export-private-key.html
310
311         It might be better to have our own bignum implementation in WTF, but we currently
312         don't, and the need for this computation is Common Crypto specific anyway.
313
314         * crypto/CommonCryptoUtilities.h:
315         * crypto/CommonCryptoUtilities.cpp:
316         (WebCore::CCBigNum::CCBigNum):
317         (WebCore::CCBigNum::~CCBigNum):
318         (WebCore::CCBigNum::operator=):
319         (WebCore::CCBigNum::data):
320         (WebCore::CCBigNum::operator-):
321         (WebCore::CCBigNum::operator%):
322         (WebCore::CCBigNum::inverse):
323         Added a minimal wrapper around CommonCrypto BigNum.
324
325         * crypto/mac/CryptoKeyRSAMac.cpp:
326         (WebCore::getPrivateKeyComponents): Compute missing parts using CCBigNum.
327         (WebCore::CryptoKeyRSA::exportData): Implemented private key case.
328
329 2013-12-03  Ryosuke Niwa  <rniwa@webkit.org>
330
331         XML fragment parsing algorithm doesn't use the context element's default namespace URI
332         https://bugs.webkit.org/show_bug.cgi?id=125132
333
334         Reviewed by Darin Adler.
335
336         Always use the context element's namespace as the default namespace URI when one is not specified by xmlns.
337
338         The new behavior matches that of Internet Explorer and the specified behavior in HTML5:
339         http://www.w3.org/TR/2013/CR-html5-20130806/the-xhtml-syntax.html#parsing-xhtml-fragments
340
341         "The default namespace is the namespace for which the DOM isDefaultNamespace() method on the element would
342         return true."
343
344         Test: fast/parser/fragment-parsing-in-document-without-xmlns.html
345
346         * xml/parser/XMLDocumentParserLibxml2.cpp:
347         (WebCore::XMLDocumentParser::XMLDocumentParser):
348
349 2013-12-03  Nick Diego Yamane  <nick.yamane@openbossa.org>
350
351         Remove some CSS Variables leftovers
352         https://bugs.webkit.org/show_bug.cgi?id=125167
353
354         Reviewed by Darin Adler.
355
356         No new tests needed. Only removing leftover code.
357
358         * css/CSSBasicShapes.cpp:
359         * css/CSSBasicShapes.h:
360
361 2013-12-03  Myles C. Maxfield  <mmaxfield@apple.com>
362
363         Checking second-to-last bit in address is a typo
364         https://bugs.webkit.org/show_bug.cgi?id=125162
365
366         Reviewed by Darin Adler.
367
368         After talking with the original author of this line,
369         is was a typo to make sure that the second-to-last bit
370         in an address is 0. Instead, we want to make sure that
371         the address is aligned to a 4-byte boundary
372
373         No behavior change, so no test is necessary
374
375         * platform/graphics/cg/ImageBufferCG.cpp:
376         (WebCore::ImageBuffer::ImageBuffer):
377
378 2013-12-03  Radu Stavila  <stavila@adobe.com>
379
380         The overflow border of a relatively positioned element inside a region is not painted
381         https://bugs.webkit.org/show_bug.cgi?id=124919
382
383         Relative positioned elements have self-painting layers that don't propagate the visual overflow
384         so the layer's position should be used when determining the clipping rectangle for box decorations.
385
386         Reviewed by Mihnea Ovidenie.
387
388         Test: fast/regions/relative-borders-overflow.html
389
390         * rendering/RenderFlowThread.cpp:
391         (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
392
393 2013-12-03  Seokju Kwon  <seokju@webkit.org>
394
395         Web Inspector: Get rid of 'hasFrontend()' in InspectorController and WorkerInspectorController
396         https://bugs.webkit.org/show_bug.cgi?id=125135
397
398         Reviewed by Darin Adler.
399
400         Remove 'hasFrontend()' from InspectorController and WorkerInspectorController
401         as it's never called.
402
403         No new tests, no behavior changes.
404
405         * inspector/InspectorController.h:
406         * inspector/WorkerInspectorController.h:
407
408 2013-12-03  Seokju Kwon  <seokju@webkit.org>
409
410         Web Inspector: webViewResized() is not used anywhere in WebInspectorUI
411         https://bugs.webkit.org/show_bug.cgi?id=125137
412
413         Reviewed by Darin Adler.
414
415         Remove leftover code.
416
417         No new tests, no behavior changes.
418
419         * inspector/InspectorController.cpp:
420         * inspector/InspectorController.h:
421         * inspector/InspectorOverlay.cpp:
422         * inspector/InspectorOverlay.h:
423         * inspector/InspectorPageAgent.cpp:
424         * inspector/InspectorPageAgent.h:
425
426 2013-12-03  László Langó  <lango@inf.u-szeged.hu>
427
428         ASSERTION FAILED: !value || (value->isPrimitiveValue()) in WebCore::StyleProperties::getLayeredShorthandValue.
429         https://bugs.webkit.org/show_bug.cgi?id=125146
430
431         Reviewed by Darin Adler.
432
433         Do not presume that |yValue| is primitive if |value| is implicit in StylePropertySerializer.
434         An implicit y-value can become explicit if specified as a separate longhand.
435         At the same time, its new value can be non-primitive.
436
437         Backported from Blink:
438         http://src.chromium.org/viewvc/blink?view=rev&rev=153678
439
440         Test: fast/css/webkit-mask-crash-implicit.html
441
442         * css/StyleProperties.cpp:
443         (WebCore::StyleProperties::getLayeredShorthandValue):
444
445 2013-12-03  Rob Buis  <rob.buis@samsung.com>
446
447         Fix build break after r160007.
448
449         * rendering/style/BasicShapes.cpp:
450         (WebCore::BasicShape::canBlend):
451
452 2013-12-03  Rob Buis  <rob.buis@samsung.com>
453
454         [css shapes] layout for new ellipse syntax
455         https://bugs.webkit.org/show_bug.cgi?id=124621
456
457         Reviewed by Dirk Schulze.
458
459         Implement support for doing layout with the new ellipse shape syntax,
460         including basic animation support.
461
462         Test: fast/shapes/shape-outside-floats/shape-outside-floats-ellipse-000.html
463
464         * rendering/shapes/Shape.cpp:
465         (WebCore::Shape::createShape): Convert new ellipse to a layout shape.
466         * rendering/style/BasicShapes.cpp:
467         (WebCore::BasicShape::canBlend): Ignore ellipses with values that
468             cannot be interpolated.
469         (WebCore::BasicShapeEllipse::floatValueForRadiusInBox): Helper function to calculate
470             either radiusX or radiusY, shared by clip-path and shape code paths.
471         (WebCore::BasicShapeEllipse::path):
472         * rendering/style/BasicShapes.h:
473
474 2013-12-03  Frédéric Wang  <fred.wang@free.fr>
475
476         Add an MathMLSelectElement class to implement <maction> and <semantics>.
477         <https://webkit.org/b/120058>
478
479         Reviewed by Chris Fleizach.
480
481         Tests: mathml/presentation/maction-dynamic.html
482                mathml/presentation/maction.html
483                mathml/presentation/semantics.html
484
485         This adds a new MathMLSelectElement class to prepare the implementation
486         of the <maction> and <semantics> elements, for which only one "selected"
487         child is visible. We now simply display the first child of the
488         <semantics> element instead of hiding the annotations and this allows to
489         handle the use case of SVG-in-MathML as generated by Instiki when
490         bug 124128 is fixed ; Gecko's selection algorithm will be implemented
491         later (bug 100626). We now also rely on the @actiontype and @selection
492         attributes to select the visible <maction> child ; It remains to deal
493         with the user interaction (bug 85734).
494
495         * CMakeLists.txt: add the new files.
496         * GNUmakefile.list.am: ditto
497         * Target.pri: ditto
498         * WebCore.vcxproj/WebCore.vcxproj: ditto
499         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto
500         * WebCore.xcodeproj/project.pbxproj: ditto
501         * css/mathml.css: remove the CSS rule for annotation/annotation-xml.
502         * mathml/MathMLAllInOne.cpp: add the new cpp file.
503         * mathml/MathMLSelectElement.cpp: Added.
504         (WebCore::MathMLSelectElement::MathMLSelectElement):
505         (WebCore::MathMLSelectElement::create):
506         (WebCore::MathMLSelectElement::createRenderer):
507         (WebCore::MathMLSelectElement::childShouldCreateRenderer):
508         (WebCore::MathMLSelectElement::finishParsingChildren):
509         (WebCore::MathMLSelectElement::childrenChanged):
510         (WebCore::MathMLSelectElement::attributeChanged):
511         (WebCore::MathMLSelectElement::updateSelectedChild): basic implementation for maction, semantics, maction@actiontype and maction@selection.
512         * mathml/MathMLSelectElement.h: Added.
513         * mathml/mathattrs.in: add actiontype and selection attributes.
514         * mathml/mathtags.in: set element classes for maction, semantics, annotation and annotation-xml.
515
516 2013-12-03  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
517
518         Nix Upstream: Adding missing nix new files to WebCore
519         https://bugs.webkit.org/show_bug.cgi?id=124987
520
521         Reviewed by Benjamin Poulain.
522
523         No new tests needed.
524
525         * PlatformNix.cmake:
526         * platform/nix/ErrorsNix.cpp: Added.
527         * platform/nix/ErrorsNix.h: Added.
528         * platform/nix/FileSystemNix.cpp: Added.
529         * platform/nix/MIMETypeRegistryNix.cpp: Added.
530         * platform/nix/SharedTimerNix.cpp: Added.
531         * platform/nix/TemporaryLinkStubs.cpp: Added.
532
533 2013-12-03  Tamas Gergely  <gertom@inf.u-szeged.hu>
534
535         Correct broken build on efl port with --no-netscape-plugin-api
536         configuration.
537         https://bugs.webkit.org/show_bug.cgi?id=123997
538
539         Reviewed by Zoltan Herczeg.
540
541         Build failed on efl port with --no-netscape-plugin-api configuration
542         as ld did not found some methods. The configuration uses a minimal
543         empty implementation of the class, which is now extended with empty
544         method implementations.
545
546         * plugins/PluginPackageNone.cpp:
547         (WebCore::PluginPackage::createPackage):
548           Returns NULL pointer.
549         (WebCore::PluginPackage::hash):
550           Returns 0.
551         (WebCore::PluginPackage::equal):
552           Returns true (equals).
553         (WebCore::PluginPackage::compare):
554           Returns 0 (equals).
555         (WebCore::PluginPackage::~PluginPackage):
556           Do nothing.
557
558 2013-12-02  Andreas Kling  <akling@apple.com>
559
560         Avoid setting style twice for generated image content.
561         <https://webkit.org/b/125128>
562
563         Take care of a FIXME I added in r158097 and avoid redundant work in
564         ImageContentData::createRenderer().
565
566         I changed the inheritance helper RenderImage::setPseudoStyle() into
567         a new createStyleInheritingFromPseudoStyle() function instead so it
568         can be used from both PseudoElement and ImageContentData.
569
570         Reviewed by Antti Koivisto.
571
572 2013-12-02  Samuel White  <samuel_white@apple.com>
573
574         AX: Add AXUIElementCountForSearchPredicate parameterized attribute.
575         https://bugs.webkit.org/show_bug.cgi?id=124561
576
577         Reviewed by Chris Fleizach.
578
579         Added ability to fetch the number of elements that match a specific criteria. This will enable VoiceOver
580         to interface with WebKit much more dynamically. We can now get an idea of how many interesting elements
581         exist on a page, and then fetch them in chunks as needed.
582
583         Test: platform/mac/accessibility/search-predicate-element-count.html
584
585         * accessibility/AccessibilityObject.cpp:
586         (WebCore::AccessibilityObject::isAccessibilityTextSearchMatch):
587         * accessibility/AccessibilityObject.h:
588         (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
589         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
590         (accessibilitySearchCriteriaForSearchPredicateParameterizedAttribute):
591         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
592         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
593
594 2013-12-02  Bem Jones-Bey  <bjonesbe@adobe.com>
595
596         [css shapes] Layout support for new circle shape syntax
597         https://bugs.webkit.org/show_bug.cgi?id=124619
598
599         Reviewed by Dirk Schulze.
600
601         Implement support for doing layout with the new circle shape syntax,
602         inclduing basic animation support.
603
604         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-circle-000.html
605                fast/shapes/shape-outside-floats/shape-outside-floats-circle-001.html
606                fast/shapes/shape-outside-floats/shape-outside-floats-circle-002.html
607                fast/shapes/shape-outside-floats/shape-outside-floats-circle-003.html
608                fast/shapes/shape-outside-floats/shape-outside-floats-circle-004.html
609                fast/shapes/shape-outside-floats/shape-outside-floats-circle-005.html
610
611         * css/BasicShapeFunctions.cpp:
612         (WebCore::floatValueForCenterCoordinate): Used by both the CSS Shapes
613             layout code and the clip path code.
614         * css/BasicShapeFunctions.h:
615         * css/CSSBasicShapes.cpp:
616         (WebCore::buildCircleString): Update to use appendLiteral, and remove
617             call to reserveCapacity - if we find that it's actually slow when
618             doing performance tests, we can hopefully do something smarter and
619             less ugly than that.
620         * css/CSSParser.cpp:
621         (WebCore::CSSParser::parseShapeRadius): Fix a logic error that caused
622             the radius keywords not to work properly.
623         * rendering/shapes/Shape.cpp:
624         (WebCore::Shape::createShape): Convert new circle to a layout shape.
625         * rendering/style/BasicShapes.cpp:
626         (WebCore::BasicShape::canBlend): Ignore circles with values that
627             cannot be interpolated.
628         (WebCore::BasicShapeCircle::floatValueForRadiusInBox): Convert circle
629             radius keywords to a float value.
630         (WebCore::BasicShapeCircle::path):
631         (WebCore::BasicShapeCircle::blend):
632         * rendering/style/BasicShapes.h:
633         (WebCore::BasicShapeCenterCoordinate::canBlend):
634         (WebCore::BasicShapeRadius::canBlend):
635
636 2013-12-02  Alexey Proskuryakov  <ap@apple.com>
637
638         WebCrypto HMAC doesn't check key algorithm's hash
639         https://bugs.webkit.org/show_bug.cgi?id=125114
640
641         Reviewed by Anders Carlsson.
642
643         Test: crypto/subtle/hmac-check-algorithm.html
644
645         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
646         (WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches): Check it.
647
648 2013-12-02  Brady Eidson  <beidson@apple.com>
649
650         Possible crash in ProgressTracker::progressHeartbeatTimerFired(Timer<ProgressTracker>*)
651         https://bugs.webkit.org/show_bug.cgi?id=125110
652
653         Reviewed by Darin Adler.
654
655         FrameLoader::loadProgressingStatusChanged() might be called while the Frame has a null FrameView.
656
657         It’s unclear how to reproduce, but there’s no harm in a null check.
658
659         * loader/FrameLoader.cpp:
660         (WebCore::FrameLoader::loadProgressingStatusChanged):
661
662 2013-12-02  Brady Eidson  <beidson@apple.com>
663
664         Possible crash in ProgressTracker::progressHeartbeatTimerFired(Timer<ProgressTracker>*)
665         https://bugs.webkit.org/show_bug.cgi?id=125110
666
667         Reviewed by Darin Adler.
668
669         It’s possible to have a null m_originatingProgressFrame when the heartbeat timer fires.
670
671         On the surface this seems impossible because the only time m_originatingProgressFrame is cleared
672         out the heartbeat timer is also stopped.
673
674         But there’s likely still a race condition in multi-threaded environments.
675
676         There’s no harm in null-checking m_originatingProgressFrame before accessing its loader.
677
678         * loader/ProgressTracker.cpp:
679         (WebCore::ProgressTracker::progressHeartbeatTimerFired):
680
681 2013-12-02  Brady Eidson  <beidson@apple.com>
682
683         Add more CachedPage null checks
684         https://bugs.webkit.org/show_bug.cgi?id=125106
685
686         Reviewed by Sam Weinig.
687
688         Only some functions in PageCache.cpp null-check the CachedPages in HistoryItems.
689
690         Every part that manipulates the CachedPage should.
691
692         * history/PageCache.cpp:
693         (WebCore::PageCache::markPagesForVistedLinkStyleRecalc):
694         (WebCore::PageCache::markPagesForFullStyleRecalc):
695         (WebCore::PageCache::markPagesForDeviceScaleChanged):
696         (WebCore::PageCache::markPagesForCaptionPreferencesChanged):
697
698 2013-12-02  Zoltan Horvath  <zoltan@webkit.org>
699
700         [CSS Shapes] Support inset parsing
701         https://bugs.webkit.org/show_bug.cgi?id=124903
702
703         Reviewed by David Hyatt.
704
705         In this patch I added support for inset shape parsing for CSS Shapes. Inset is defined
706         by CSS Shapes Level 1 (http://dev.w3.org/csswg/css-shapes-1/#supported-basic-shapes).
707         Inset is going to be used by shape-outside (bug #124905), and eventually by shape-inside.
708
709         No new tests, I updated existing tests to cover the changes.
710
711         * css/BasicShapeFunctions.cpp:
712         (WebCore::valueForBasicShape): Add support for inset.
713         (WebCore::basicShapeForValue): Add support for inset.
714         * css/CSSBasicShapes.cpp:
715         (WebCore::buildInsetString): Create inset css string.
716         (WebCore::CSSBasicShapeInset::cssText): Convert inset shape to a CSS string.
717         (WebCore::CSSBasicShapeInset::equals): Compare two inset rectangles.
718         (WebCore::CSSBasicShapeInset::serializeResolvingVariables): Create an inset string, with CSS variables resolved.
719         (WebCore::CSSBasicShapeInset::hasVariableReference): Determine if this inset has any CSS Variable references.
720         * css/CSSBasicShapes.h: Add inset class.
721         (WebCore::CSSBasicShapeInset::create):
722         (WebCore::CSSBasicShapeInset::top):
723         (WebCore::CSSBasicShapeInset::right):
724         (WebCore::CSSBasicShapeInset::bottom):
725         (WebCore::CSSBasicShapeInset::left):
726         (WebCore::CSSBasicShapeInset::topLeftRadius):
727         (WebCore::CSSBasicShapeInset::topRightRadius):
728         (WebCore::CSSBasicShapeInset::bottomRightRadius):
729         (WebCore::CSSBasicShapeInset::bottomLeftRadius):
730         (WebCore::CSSBasicShapeInset::setTop):
731         (WebCore::CSSBasicShapeInset::setRight):
732         (WebCore::CSSBasicShapeInset::setBottom):
733         (WebCore::CSSBasicShapeInset::setLeft):
734         (WebCore::CSSBasicShapeInset::setTopLeftRadius):
735         (WebCore::CSSBasicShapeInset::setTopRightRadius):
736         (WebCore::CSSBasicShapeInset::setBottomRightRadius):
737         (WebCore::CSSBasicShapeInset::setBottomLeftRadius):
738         (WebCore::CSSBasicShapeInset::CSSBasicShapeInset):
739         * css/CSSParser.cpp:
740         (WebCore::completeBorderRadii): Move static function before parseInsetBorderRadius.
741         (WebCore::CSSParser::parseInsetRoundedCorners): I added this helper function for parsing the rounded corners
742         (WebCore::CSSParser::parseBasicShapeInset): Parse inset.
743         (WebCore::CSSParser::parseBasicShape): Add call to parse inset.
744         * css/CSSParser.h:
745         * css/CSSPrimitiveValue.cpp:
746         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add constructor for LengthSize.
747         (WebCore::CSSPrimitiveValue::init): Initialize LengthSize.
748         * css/CSSPrimitiveValue.h:
749         (WebCore::CSSPrimitiveValue::create): Add support for creating PrimitiveValue from LengthSize.
750         * css/CSSValuePool.h:
751         (WebCore::CSSValuePool::createValue): Add support for LengthSize.
752         * platform/LengthSize.h:
753         (WebCore::LengthSize::blend): Add blend for LengthSize.
754         * rendering/shapes/ShapeInsideInfo.cpp:
755         (WebCore::ShapeInsideInfo::isEnabledFor): Keep inset disabled for shape-inside now.
756         * rendering/style/BasicShapes.cpp:
757         (WebCore::BasicShapeInset::path): Calculate path for an inset.
758         (WebCore::BasicShapeInset::blend): Blend two insets.
759         * rendering/style/BasicShapes.h: Add higher level inset.
760         (WebCore::BasicShapeInset::create):
761         (WebCore::BasicShapeInset::top):
762         (WebCore::BasicShapeInset::right):
763         (WebCore::BasicShapeInset::bottom):
764         (WebCore::BasicShapeInset::left):
765         (WebCore::BasicShapeInset::topLeftRadius):
766         (WebCore::BasicShapeInset::topRightRadius):
767         (WebCore::BasicShapeInset::bottomRightRadius):
768         (WebCore::BasicShapeInset::bottomLeftRadius):
769         (WebCore::BasicShapeInset::setTop):
770         (WebCore::BasicShapeInset::setRight):
771         (WebCore::BasicShapeInset::setBottom):
772         (WebCore::BasicShapeInset::setLeft):
773         (WebCore::BasicShapeInset::setTopLeftRadius):
774         (WebCore::BasicShapeInset::setTopRightRadius):
775         (WebCore::BasicShapeInset::setBottomRightRadius):
776         (WebCore::BasicShapeInset::setBottomLeftRadius):
777         (WebCore::BasicShapeInset::BasicShapeInset):
778
779 2013-12-02  Alexey Proskuryakov  <ap@apple.com>
780
781         Support WebCrypto AES-KW
782         https://bugs.webkit.org/show_bug.cgi?id=125105
783
784         Reviewed by Sam Weinig.
785
786         Tests: crypto/subtle/aes-kw-key-manipulation.html
787                crypto/subtle/aes-kw-wrap-unwrap-aes.html
788
789         * WebCore.xcodeproj/project.pbxproj: Added new files.
790
791         * crypto/CryptoAlgorithmIdentifier.h: (WebCore::CryptoAlgorithmIdentifier): Added AES-KW.
792         It's not standardized yet, but there appears to be a consensus that it will be specified.
793
794         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
795         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
796         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
797         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
798         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
799         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
800         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
801         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
802         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
803         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
804         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
805         Added AES-KW cases everywhere.
806
807         * bindings/js/JSCryptoKeySerializationJWK.cpp:
808         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
809         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid):
810         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
811         Support importing/exporting AES-KW keys in JWK.
812
813         * bindings/js/JSSubtleCryptoCustom.cpp:
814         (WebCore::JSSubtleCrypto::importKey):
815         (WebCore::JSSubtleCrypto::exportKey):
816         (WebCore::JSSubtleCrypto::wrapKey):
817         (WebCore::JSSubtleCrypto::unwrapKey):
818         Added some accidentally forgotten std::moves.
819
820         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: Added.
821         * crypto/algorithms/CryptoAlgorithmAES_KW.h: Added.
822         * crypto/mac/CryptoAlgorithmAES_KWMac.cpp: Added.
823
824         * crypto/keys/CryptoKeyAES.cpp: (WebCore::CryptoKeyAES::CryptoKeyAES): Allow AES-KW
825         as valid algorithm for AES keys.
826
827         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
828         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register AES-KW.
829
830 2013-12-02  Beth Dakin  <bdakin@apple.com>
831
832         Add a setting to opt into a mode where the background extends and fixed elements 
833         don't move on rubber-band
834         https://bugs.webkit.org/show_bug.cgi?id=124745
835
836         Reviewed by Tim Horton.
837
838         New setting backgroundShouldExtendBeyondPage() will cause the tile cache to have a 
839         margin, and it will also cause fixed elements and backgrounds to stick to the 
840         viewport on scroll instead of sticking to the document. 
841
842         * WebCore.exp.in:
843         * page/FrameView.cpp:
844         (WebCore::FrameView::scrollBehaviorForFixedElements):
845         * page/Settings.in:
846         * rendering/RenderLayerBacking.cpp:
847         (WebCore::RenderLayerBacking::RenderLayerBacking):
848
849 2013-12-02  Roger Zanoni  <rogerzanoni@gmail.com>
850
851         [MediaStream] Use iterator-based loops instead of index-based loops
852         https://bugs.webkit.org/show_bug.cgi?id=125021
853
854         Reviewed by Eric Carlson.
855
856         Also, changing iterator variable names from iter to it and
857         initializing an 'end' variable in each loop instead of evaluating
858         'collection.end()' multiple times.
859
860         No new tests, covered by existing ones.
861
862         * Modules/mediastream/MediaStream.cpp:
863         (WebCore::MediaStream::cloneMediaStreamTrackVector):
864         (WebCore::MediaStream::haveTrackWithSource):
865         (WebCore::MediaStream::getTrackById):
866         (WebCore::MediaStream::trackDidEnd):
867         (WebCore::MediaStream::scheduledEventTimerFired):
868
869 2013-12-02  Rob Buis  <rob.buis@samsung.com>
870
871         [css shapes] Parse new ellipse shape syntax
872         https://bugs.webkit.org/show_bug.cgi?id=124620
873
874         Reviewed by Dirk Schulze.
875
876         Implement parsing of the new ellipse shape syntax. This closely follows the patch
877         for the new circle syntax (https://bugs.webkit.org/show_bug.cgi?id=124618), with
878         some refactoring of functionality shared by both.
879
880         Updated existing parsing tests to cover this.
881
882         * css/BasicShapeFunctions.cpp:
883         (WebCore::BasicShapeRadiusToCSSValue):
884         (WebCore::valueForBasicShape):
885         (WebCore::CSSValueToBasicShapeRadius):
886         (WebCore::basicShapeForValue):
887         * css/CSSBasicShapes.cpp:
888         (WebCore::buildEllipseString):
889         (WebCore::CSSBasicShapeEllipse::cssText):
890         (WebCore::CSSBasicShapeEllipse::equals):
891         (WebCore::buildDeprecatedEllipseString):
892         (WebCore::CSSDeprecatedBasicShapeEllipse::cssText):
893         (WebCore::CSSDeprecatedBasicShapeEllipse::equals):
894         * css/CSSBasicShapes.h:
895         (WebCore::CSSDeprecatedBasicShapeEllipse::create):
896         (WebCore::CSSDeprecatedBasicShapeEllipse::centerX):
897         (WebCore::CSSDeprecatedBasicShapeEllipse::centerY):
898         (WebCore::CSSDeprecatedBasicShapeEllipse::radiusX):
899         (WebCore::CSSDeprecatedBasicShapeEllipse::radiusY):
900         (WebCore::CSSDeprecatedBasicShapeEllipse::setCenterX):
901         (WebCore::CSSDeprecatedBasicShapeEllipse::setCenterY):
902         (WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusX):
903         (WebCore::CSSDeprecatedBasicShapeEllipse::setRadiusY):
904         (WebCore::CSSDeprecatedBasicShapeEllipse::CSSDeprecatedBasicShapeEllipse):
905         * css/CSSParser.cpp:
906         (WebCore::CSSParser::parseBasicShapeEllipse):
907         (WebCore::CSSParser::parseDeprecatedBasicShapeEllipse):
908         (WebCore::CSSParser::parseBasicShape):
909         * css/CSSParser.h:
910         * rendering/shapes/Shape.cpp:
911         (WebCore::Shape::createShape):
912         * rendering/style/BasicShapes.cpp:
913         (WebCore::DeprecatedBasicShapeEllipse::path):
914         (WebCore::DeprecatedBasicShapeEllipse::blend):
915         (WebCore::BasicShapeEllipse::path):
916         (WebCore::BasicShapeEllipse::blend):
917         * rendering/style/BasicShapes.h:
918         (WebCore::BasicShapeEllipse::centerX):
919         (WebCore::BasicShapeEllipse::centerY):
920         (WebCore::BasicShapeEllipse::radiusX):
921         (WebCore::BasicShapeEllipse::radiusY):
922         (WebCore::BasicShapeEllipse::setCenterX):
923         (WebCore::BasicShapeEllipse::setCenterY):
924         (WebCore::BasicShapeEllipse::setRadiusX):
925         (WebCore::BasicShapeEllipse::setRadiusY):
926         (WebCore::BasicShapeEllipse::BasicShapeEllipse):
927         (WebCore::DeprecatedBasicShapeEllipse::create):
928         (WebCore::DeprecatedBasicShapeEllipse::DeprecatedBasicShapeEllipse):
929
930 2013-12-02  Alexey Proskuryakov  <ap@apple.com>
931
932         Add support for WebCrypto RSA-OAEP
933         https://bugs.webkit.org/show_bug.cgi?id=125084
934
935         Build fix.
936
937         * crypto/CommonCryptoUtilities.h:
938         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
939         * crypto/mac/CryptoKeyRSAMac.cpp:
940
941 2013-12-02  Brendan Long  <b.long@cablelabs.com>
942
943         Use GenericEventQueue in TrackListBase and reduce code duplication with scheduleTrackEvent()
944         https://bugs.webkit.org/show_bug.cgi?id=124811
945
946         Reviewed by Eric Carlson.
947
948         No new tests because this is just refactoring.
949
950         * html/track/TrackListBase.cpp:
951         (TrackListBase::TrackListBase): Replace event code with a GenericEventQueue.
952         (TrackListBase::scheduleTrackEvent): Factor out duplicate code in schedule{Add,Remove}TrackEvent functions.
953         (TrackListBase::scheduleAddTrackEvent): Same.
954         (TrackListBase::scheduleRemoveTrackEvent): Same.
955         (TrackListBase::scheduleChangeEvent): Use GenericEventQueue.
956         * html/track/TrackListBase.h: Replace event code with GenericEventQueue.
957
958 2013-12-02  Alexey Proskuryakov  <ap@apple.com>
959
960         Add support for WebCrypto RSA-OAEP
961         https://bugs.webkit.org/show_bug.cgi?id=125084
962
963         Build fix.
964
965         * WebCore.xcodeproj/project.pbxproj: Fix an automatic merge failure by re-adding
966         CryptoAlgorithmRsaOaepParams.h.
967
968 2013-12-02  Victor Jaquez  <vjaquez@igalia.com>
969
970         [Gstreamer] update webkitvideosink metadata
971         https://bugs.webkit.org/show_bug.cgi?id=125082
972
973         Reviewed by Philippe Normand.
974
975         No new tests, no behavior changes.
976
977         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
978         (webkit_video_sink_class_init):
979
980 2013-12-02  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
981
982         Simplify MediaPlayerPrivateGStreamerBase::createVideoSink()
983         https://bugs.webkit.org/show_bug.cgi?id=125077
984
985         Remove the method's unused parameter.
986         Remove the GStreamer 0.10.22 run-time validation, since we are using
987         GStreamer 1.0 officially.
988         Remove the creation of a spurious Bin for the video sink, since
989         either the fpssink or the webkitsink are valid sink elements.
990         Change fpsink to a GRefPtr.
991
992         Now, createVideoSink() returns a simple pointer to the created sink
993         element.
994
995         Reviewed by Philippe Normand.
996
997         No new tests, no behavior changes.
998
999         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1000         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1001         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1002         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
1003         (WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount):
1004         (WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount):
1005         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1006
1007 2013-12-02  Alexey Proskuryakov  <ap@apple.com>
1008
1009         Add support for WebCrypto RSA-OAEP
1010         https://bugs.webkit.org/show_bug.cgi?id=125084
1011
1012         Reviewed by Sam Weinig.
1013
1014         Tests: crypto/subtle/rsa-oaep-key-manipulation.html
1015                crypto/subtle/rsa-oaep-plaintext-length.html
1016                crypto/subtle/rsa-oaep-wrap-unwrap-aes.html
1017
1018         * WebCore.xcodeproj/project.pbxproj: Added new files.
1019
1020         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
1021         (WebCore::createRsaOaepParams):
1022         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
1023         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
1024         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
1025         Added RSA-OAEP parameters.
1026
1027         * bindings/js/JSCryptoKeySerializationJWK.cpp:
1028         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
1029         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid):
1030         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
1031         Support RSA-OAEP in JWK. It is more limited than general WebCrypto, as JWK only
1032         allows SHA-1 as hash.
1033
1034         * crypto/CommonCryptoUtilities.cpp: Added. (WebCore::getCommonCryptoDigestAlgorithm):
1035         * crypto/CommonCryptoUtilities.h: Added.
1036         Extracted some shared code and forward declarations for CommonCrypto.
1037
1038         * crypto/CryptoAlgorithmParameters.h: (WebCore::CryptoAlgorithmParameters::Class):
1039         * crypto/parameters/CryptoAlgorithmRsaOaepParams.h: Added.
1040         Added RsaOaepParams.
1041
1042         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: Added.
1043         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h: Added.
1044         * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp: Added.
1045
1046         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
1047         (WebCore::getCommonCryptoHMACAlgorithm):
1048         (WebCore::CryptoAlgorithmHMAC::platformSign):
1049         (WebCore::CryptoAlgorithmHMAC::platformVerify):
1050         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
1051         * crypto/mac/CryptoKeyMac.cpp:
1052         * crypto/mac/CryptoKeyRSAMac.cpp:
1053         Use CommonCryptoUtilities.
1054
1055         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
1056         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Register RSA-OAEP.
1057
1058 2013-12-02  Andres Gomez  <agomez@igalia.com>
1059
1060         [GTK] Fails to build with freetype 2.5.1
1061         https://bugs.webkit.org/show_bug.cgi?id=125074
1062
1063         Reviewed by Carlos Garcia Campos.
1064
1065         FreeType specifies a canonical way of including their own
1066         headers. Now, we are following this recommendation so the
1067         compilation won't be broken again due to an upgrade in FeeType's
1068         including paths.
1069
1070         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1071         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1072         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
1073
1074 2013-12-02  Chris Fleizach  <cfleizach@apple.com>
1075
1076         AX: Crash at WebCore::commonTreeScope
1077         https://bugs.webkit.org/show_bug.cgi?id=125042
1078
1079         Reviewed by Mario Sanchez Prada.
1080
1081         When an AX text marker that references a node in a detached document is used to create a text marker range, a crash occurs
1082         because the method to determine commonTreeScopes does not account for when there are no common tree scopes.
1083
1084         Test: platform/mac/accessibility/ordered-textmarker-crash.html
1085
1086         * accessibility/AccessibilityObject.cpp:
1087         (WebCore::AccessibilityObject::visiblePositionRangeForUnorderedPositions):
1088         * dom/TreeScope.cpp:
1089         (WebCore::commonTreeScope):
1090
1091 2013-12-02  Nick Diego Yamane  <nick.yamane@openbossa.org>
1092
1093         Fix a crash in the webaudio source provider when the audio track is going away.
1094         https://bugs.webkit.org/show_bug.cgi?id=124975
1095
1096         Reviewed by Philippe Normand.
1097
1098         Merged https://chromium.googlesource.com/chromium/blink/+/b21838b32bf11b1a972dfc449ddde71115490c23
1099
1100         Before this patch, it was hitting a use-after-free crash  when the audio
1101         track in the media stream is going away and the webaudio mediastreamsourcenode
1102         is still running.
1103
1104         * Modules/webaudio/AudioContext.cpp:
1105         (WebCore::AudioContext::createMediaStreamSource): Passing audio track
1106         pointer to MediaStreamAudioSourceNode constructor.
1107         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
1108         (WebCore::MediaStreamAudioSourceNode::create):
1109         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
1110         * Modules/webaudio/MediaStreamAudioSourceNode.h: Added
1111         MediaStreamTrack class variable and change the constructor to receive
1112         it as parameter.
1113
1114 2013-12-02  Andrzej Badowski  <a.badowski@samsung.com>
1115
1116         [ATK] Support active state for listbox elements.
1117         https://bugs.webkit.org/show_bug.cgi?id=125009
1118
1119         Reviewed by Chris Fleizach.
1120
1121         Added support for ATK_STATE_ACTIVE for listbox elements.
1122
1123         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1124         (setAtkStateSetFromCoreObject):
1125
1126 2013-12-02  Seokju Kwon  <seokju@webkit.org>
1127
1128         Web Inspector: Remove unused functions from InspectorAgent
1129         https://bugs.webkit.org/show_bug.cgi?id=125061
1130
1131         Reviewed by Antoine Quint.
1132
1133         Get rid of unused functions, redundant inclusion and forward declaration.
1134
1135         No new tests, no behavior changes.
1136
1137         * inspector/InspectorAgent.cpp:
1138         * inspector/InspectorAgent.h:
1139
1140 2013-12-02  Tibor Meszaros  <mtibor@inf.u-szeged.hu>
1141
1142         Fix build warning in EventHandler.cpp
1143         https://bugs.webkit.org/show_bug.cgi?id=125010
1144
1145         Reviewed by Csaba Osztrogonác.
1146
1147         * page/EventHandler.cpp:
1148         (WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
1149
1150 2013-12-02  Attila Dusnoki  <adusnoki@inf.u-szeged.hu>
1151
1152         HTML5 required attribute validation messages implemented.
1153         https://bugs.webkit.org/show_bug.cgi?id=125003
1154
1155         Reviewed by Gyuyoung Kim.
1156
1157         * platform/efl/LocalizedStringsEfl.cpp:
1158         (WebCore::validationMessagePatternMismatchText):
1159         (WebCore::validationMessageValueMissingText):
1160         (WebCore::validationMessageValueMissingForCheckboxText):
1161         (WebCore::validationMessageValueMissingForFileText):
1162         (WebCore::validationMessageValueMissingForMultipleFileText):
1163         (WebCore::validationMessageValueMissingForRadioText):
1164         (WebCore::validationMessageValueMissingForSelectText):
1165         (WebCore::validationMessageBadInputForNumberText):
1166
1167 2013-12-01  Andreas Kling  <akling@apple.com>
1168
1169         SVG: Intersection/enclosure checks should use RenderElement.
1170         <https://webkit.org/b/125058>
1171
1172         Make RenderSVGModelObject's checkIntersection() and checkEnclosure()
1173         take RenderElement* instead of RenderObject*. They are only ever
1174         called with SVGElement's renderers.
1175
1176         Reviewed by Sam Weinig.
1177
1178 2013-12-01  Andreas Kling  <akling@apple.com>
1179
1180         Remove unreachable labels for -webkit-margin-*-collapse properties.
1181         <https://webkit.org/b/125057>
1182
1183         The following properties are implemented in DeprecatedStyleBuilder
1184         and should not have case labels in the applyProperty() switch:
1185
1186             -webkit-margin-before-collapse
1187             -webkit-margin-top-collapse
1188             -webkit-margin-after-collapse
1189             -webkit-margin-bottom-collapse
1190
1191         This seems counter-intuitive, but they are actually *not* like other
1192         directional properties. In this case, before/after are only aliases
1193         for top/bottom, and do not depend on writing-mode or text-direction.
1194         See also r68561, where the aliases were originally added.
1195
1196         Reviewed by Anders Carlsson.
1197
1198 2013-12-01  Andreas Kling  <akling@apple.com>
1199
1200         CSSFunctionValue constructors should return PassRef.
1201         <https://webkit.org/b/125054>
1202
1203         Make CSSFunctionValue::create() helpers return PassRef instead of
1204         PassRefPtr since they will never return null.
1205
1206         Reviewed by Anders Carlsson.
1207
1208 2013-12-01  Commit Queue  <commit-queue@webkit.org>
1209
1210         Unreviewed, rolling out r159764.
1211         http://trac.webkit.org/changeset/159764
1212         https://bugs.webkit.org/show_bug.cgi?id=125055
1213
1214         appears to hurt html5-full-render times (Requested by kling on
1215         #webkit).
1216
1217         * html/parser/HTMLConstructionSite.cpp:
1218         (WebCore::HTMLConstructionSite::insertTextNode):
1219         * html/parser/HTMLConstructionSite.h:
1220
1221 2013-12-01  Andreas Kling  <akling@apple.com>
1222
1223         Make more computed style helpers return PassRef.
1224         <https://webkit.org/b/125043>
1225
1226         Reduce branchiness in computed style code by making more of the
1227         file-local helpers return PassRef instead of PassRefPtr.
1228
1229         Reviewed by Anders Carlsson.
1230
1231 2013-11-30  Ryuan Choi  <ryuan.choi@samsung.com>
1232
1233         [EFL] Implement scrollbarThickness for opaque scrollbar
1234         https://bugs.webkit.org/show_bug.cgi?id=125034
1235
1236         Reviewed by Gyuyoung Kim.
1237
1238         Implemented scrollbarThickness to support opaque scrollbar.
1239         Now, edj can decide whether to support opaque scrollbar by adding scrollbar.thickness.
1240         In addition, added OVERRIDE/FINAL keyword and removed unnecessary destructor
1241         in ScrollbarThemeEfl.cpp.
1242
1243         No new tests, no behavior changes with default theme.
1244
1245         * platform/efl/RenderThemeEfl.cpp:
1246         (WebCore::RenderThemeEfl::loadTheme):
1247         Update thickness of scrollbar when theme was loaded.
1248         * platform/efl/ScrollbarThemeEfl.cpp:
1249         * platform/efl/ScrollbarThemeEfl.h:
1250         (WebCore::ScrollbarThemeEfl::setScrollbarThickness):
1251         (WebCore::ScrollbarThemeEfl::scrollbarThickness):
1252         (WebCore::ScrollbarThemeEfl::registerScrollbar):
1253         (WebCore::ScrollbarThemeEfl::unregisterScrollbar):
1254
1255 2013-11-29  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
1256
1257         Remove Symbian specific code.
1258         https://bugs.webkit.org/show_bug.cgi?id=124939
1259
1260         Reviewed by Zoltan Herczeg.
1261
1262         Symbian is not supported, remove leftover code.
1263
1264         * plugins/npapi.h:
1265
1266 2013-11-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1267
1268         Rename InlineIterator::m_obj and make it private
1269         https://bugs.webkit.org/show_bug.cgi?id=124837
1270
1271         Reviewed by Antti Koivisto.
1272
1273         InlineIterator has been exported m_obj as public though there is a getter function.
1274         Besides *object* name isn't ambigious. So, changed it with m_renderer and renderer().
1275         Additionally, setRenderer() is added as well.
1276
1277         No new tests, no behavior changes.
1278
1279         * rendering/InlineIterator.h:
1280         (WebCore::InlineIterator::setObject):
1281         (WebCore::operator==):
1282         (WebCore::operator!=):
1283         (WebCore::InlineBidiResolver::appendRun):
1284         * rendering/RenderBlockLineLayout.cpp:
1285         (WebCore::RenderBlockFlow::appendRunsForObject):
1286         (WebCore::constructBidiRunsForLine):
1287         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
1288         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1289         (WebCore::RenderBlockFlow::matchedEndLine):
1290         * rendering/line/BreakingContextInlineHeaders.h:
1291         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
1292         (WebCore::BreakingContext::BreakingContext):
1293         (WebCore::BreakingContext::currentObject):
1294         (WebCore::BreakingContext::initializeForCurrentObject):
1295         (WebCore::BreakingContext::handleBR):
1296         (WebCore::BreakingContext::handleOutOfFlowPositioned):
1297         (WebCore::BreakingContext::handleFloat):
1298         (WebCore::BreakingContext::handleEmptyInline):
1299         (WebCore::BreakingContext::handleReplaced):
1300         (WebCore::iteratorIsBeyondEndOfRenderCombineText):
1301         (WebCore::ensureCharacterGetsLineBox):
1302         (WebCore::BreakingContext::handleText):
1303         (WebCore::BreakingContext::canBreakAtThisPosition):
1304         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
1305         (WebCore::checkMidpoints):
1306         (WebCore::BreakingContext::handleEndOfLine):
1307         * rendering/line/LineBreaker.cpp:
1308         (WebCore::LineBreaker::skipTrailingWhitespace):
1309         (WebCore::LineBreaker::skipLeadingWhitespace):
1310         * rendering/line/LineInlineHeaders.h:
1311         (WebCore::skipNonBreakingSpace):
1312         (WebCore::requiresLineBox):
1313
1314 2013-11-28  Antti Koivisto  <antti@apple.com>
1315
1316         Rename StylePropertySet to StyleProperties
1317         https://bugs.webkit.org/show_bug.cgi?id=124990
1318         
1319         Reviewed by Andreas Kling.
1320
1321         "Set" does not add useful information here. Use less clunky plural name.
1322
1323 2013-11-28  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1324
1325         Nix Upstream: Adding EditorNix to WebCore
1326         https://bugs.webkit.org/show_bug.cgi?id=124984
1327
1328         Reviewed by Csaba Osztrogonác.
1329
1330         No new tests needed.
1331
1332         * PlatformNix.cmake:
1333         * editing/nix/EditorNix.cpp: Added.
1334
1335 2013-11-28  Zoltan Horvath  <zoltan@webkit.org>
1336
1337         [Win] Update vcxproj.filters, since LineInfo.h and LineLayoutState.h have been moved to rendering/line
1338         https://bugs.webkit.org/show_bug.cgi?id=124959
1339
1340         Reviewed by Brent Fulgham.
1341
1342         Update WebCore.vcxproj.filters, since LineInfo.h (r155628) and LineLayoutState.h (158121) have been moved to rendering/line.
1343
1344         No new tests, no behavior change.
1345
1346         * WebCore.vcxproj/WebCore.vcxproj.filters:
1347
1348 2013-11-28  Laszlo Vidacs  <lac@inf.u-szeged.hu>
1349
1350         RenderTableSection Blink merge asserting
1351         https://bugs.webkit.org/show_bug.cgi?id=124857
1352
1353         Reviewed by Csaba Osztrogonác.
1354
1355         Use border spacing at the end of all sections.
1356
1357         * rendering/RenderTableSection.cpp:
1358         (WebCore::RenderTableSection::calcRowLogicalHeight):
1359
1360 2013-11-28  Antti Koivisto  <antti@apple.com>
1361
1362         Remove feature: CSS variables
1363         https://bugs.webkit.org/show_bug.cgi?id=114119
1364
1365         Reviewed by Andreas Kling.
1366         
1367         The feature is unmaintained and it is getting in the way of refactoring. Code quality is not up to
1368         WebKit standards either.
1369
1370         * Configurations/FeatureDefines.xcconfig:
1371         * GNUmakefile.list.am:
1372         * WebCore.xcodeproj/project.pbxproj:
1373         * css/CSSBasicShapes.cpp:
1374         * css/CSSBasicShapes.h:
1375         * css/CSSCalculationValue.cpp:
1376         (WebCore::unitCategory):
1377         (WebCore::hasDoubleValue):
1378         (WebCore::CSSCalcPrimitiveValue::toCalcValue):
1379         (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
1380         (WebCore::determineCategory):
1381         (WebCore::CSSCalcBinaryOperation::primitiveType):
1382         * css/CSSCalculationValue.h:
1383         * css/CSSComputedStyleDeclaration.cpp:
1384         (WebCore::ComputedStyleExtractor::propertyValue):
1385         * css/CSSGrammar.y.in:
1386         * css/CSSParser.cpp:
1387         (WebCore::CSSParserContext::CSSParserContext):
1388         (WebCore::operator==):
1389         (WebCore::filterProperties):
1390         (WebCore::CSSParser::createStylePropertySet):
1391         (WebCore::CSSParser::addProperty):
1392         (WebCore::CSSParser::validCalculationUnit):
1393         (WebCore::CSSParser::validUnit):
1394         (WebCore::CSSParser::createPrimitiveNumericValue):
1395         (WebCore::CSSParser::parseValidPrimitive):
1396         (WebCore::CSSParser::parseValue):
1397         (WebCore::CSSParser::parseReflect):
1398         (WebCore::CSSParser::detectDashToken):
1399         (WebCore::CSSParser::realLex):
1400         * css/CSSParser.h:
1401         * css/CSSParserMode.h:
1402         * css/CSSParserValues.cpp:
1403         (WebCore::CSSParserValue::createCSSValue):
1404         * css/CSSParserValues.h:
1405         * css/CSSPrimitiveValue.cpp:
1406         (WebCore::isValidCSSUnitTypeForDoubleConversion):
1407         (WebCore::CSSPrimitiveValue::primitiveType):
1408         (WebCore::CSSPrimitiveValue::cleanup):
1409         (WebCore::CSSPrimitiveValue::getStringValue):
1410         (WebCore::CSSPrimitiveValue::customCSSText):
1411         (WebCore::CSSPrimitiveValue::equals):
1412         * css/CSSPrimitiveValue.h:
1413         * css/CSSPrimitiveValueMappings.h:
1414         (WebCore::CSSPrimitiveValue::convertToLength):
1415         * css/CSSProperty.cpp:
1416         * css/CSSProperty.h:
1417         (WebCore::CSSProperty::CSSProperty):
1418         * css/CSSReflectValue.cpp:
1419         * css/CSSReflectValue.h:
1420         * css/CSSValue.cpp:
1421         (WebCore::CSSValue::equals):
1422         (WebCore::CSSValue::cssText):
1423         (WebCore::CSSValue::destroy):
1424         * css/CSSValue.h:
1425         (WebCore::CSSValue::setCssText):
1426         * css/CSSValueList.cpp:
1427         * css/CSSValueList.h:
1428         * css/CSSVariableValue.h: Removed.
1429         * css/Pair.h:
1430         * css/Rect.h:
1431         * css/StylePropertySet.cpp:
1432         (WebCore::StylePropertySet::asText):
1433         (WebCore::StylePropertySet::PropertyReference::cssName):
1434         * css/StyleResolver.cpp:
1435         (WebCore::StyleResolver::styleForPage):
1436         (WebCore::StyleResolver::applyProperties):
1437         (WebCore::StyleResolver::applyMatchedProperties):
1438         (WebCore::StyleResolver::applyProperty):
1439         * css/StyleResolver.h:
1440         * css/WebKitCSSTransformValue.cpp:
1441         * css/WebKitCSSTransformValue.h:
1442         (WebCore::WebKitCSSTransformValue::equals):
1443         * css/makeprop.pl:
1444         * page/Settings.cpp:
1445         (WebCore::Settings::Settings):
1446         * page/Settings.h:
1447         * rendering/style/RenderStyle.h:
1448         * rendering/style/StyleRareInheritedData.cpp:
1449         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1450         (WebCore::StyleRareInheritedData::operator==):
1451         * rendering/style/StyleRareInheritedData.h:
1452         * rendering/style/StyleVariableData.h: Removed.
1453         * testing/InternalSettings.cpp:
1454         (WebCore::InternalSettings::Backup::Backup):
1455         (WebCore::InternalSettings::Backup::restoreTo):
1456         * testing/InternalSettings.h:
1457         * testing/InternalSettings.idl:
1458
1459 2013-11-28  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1460
1461         Updating RTCPeerConnectionHandlerMock after r159769
1462         https://bugs.webkit.org/show_bug.cgi?id=124947
1463
1464         Reviewed by Philippe Normand.
1465
1466         Adding its create function back, in order to run RTCPeerConnection LayoutTests.
1467
1468         No new tests needed.
1469
1470         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1471         (WebCore::RTCPeerConnectionHandlerMock::create):
1472         * platform/mock/RTCPeerConnectionHandlerMock.h:
1473
1474 2013-11-27  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1475
1476         [GTK] Support custom types for drag and drop data
1477         https://bugs.webkit.org/show_bug.cgi?id=124659
1478
1479         Reviewed by Martin Robinson.
1480
1481         Covered by fast/events/drag-customData.html.
1482
1483         * platform/gtk/DataObjectGtk.cpp:
1484         (WebCore::DataObjectGtk::unknownTypes): returns a hash map with all custom types set.
1485         (WebCore::DataObjectGtk::clearAllExceptFilenames): clear custom types.
1486         * platform/gtk/DataObjectGtk.h:
1487         (WebCore::DataObjectGtk::hasUnknownTypeData): returns whether custom types are set.
1488         (WebCore::DataObjectGtk::unknownTypeData): returns the data for a custom type.
1489         (WebCore::DataObjectGtk::setUnknownTypeData): sets the data for a custom type.
1490         * platform/gtk/PasteboardGtk.cpp:
1491         (WebCore::Pasteboard::writeString): handle unknown types as custom.
1492         (WebCore::Pasteboard::writePasteboard): ditto.
1493         (WebCore::Pasteboard::hasData): also check for custom types.
1494         (WebCore::Pasteboard::types): also obtain the list of custom types.
1495         (WebCore::Pasteboard::readString): handle unknown types as custom.
1496         * platform/gtk/PasteboardHelper.cpp:
1497         (WebCore::initGdkAtoms): new unknown atom.
1498         (WebCore::PasteboardHelper::PasteboardHelper): add custom type to the list of targets.
1499         (WebCore::PasteboardHelper::fillSelectionData): turns any custom types' data into a GVariant, which
1500         is in turn serialized to a single string for GtkSelectionData to hold.
1501         (WebCore::PasteboardHelper::targetListForDataObject): add custom data to the target list if any is
1502         set.
1503         (WebCore::PasteboardHelper::fillDataObjectFromDropData): retrieve the custom types and their data
1504         from the serialized GVariant string held by GtkSelectionData.
1505         (WebCore::PasteboardHelper::dropAtomsForContext): handle custom types.
1506
1507 2013-11-27  Eric Carlson  <eric.carlson@apple.com>
1508
1509         Allow the QuickTime plug-in to be replaced by script in an isolated word
1510         https://bugs.webkit.org/show_bug.cgi?id=124900
1511
1512         Reviewed by Dean Jackson.
1513
1514         Test: plugins/quicktime-plugin-replacement.html
1515
1516         * CMakeLists.txt: Add new Modules path.
1517         * DerivedSources.make: Add new files.
1518         * GNUmakefile.am: Add new Modules path.
1519         * GNUmakefile.list.am: Add new header.
1520         * WebCore.vcxproj/WebCore.vcxproj: Add new header.
1521         * WebCore.vcxproj/WebCoreCommon.props: Add new Modules path.
1522         * WebCore.xcodeproj/project.pbxproj: Add new files.
1523
1524         * Modules/plugins: Added.
1525         * Modules/plugins/PluginReplacement.h: Added. Defines the interface for a plug-in replacement.
1526
1527         Create a replacement for the QuickTime plug-in.
1528         * Modules/plugins/QuickTimePluginReplacement.cpp: Added.
1529         * Modules/plugins/QuickTimePluginReplacement.css: Added.
1530         * Modules/plugins/QuickTimePluginReplacement.h: Added.
1531         * Modules/plugins/QuickTimePluginReplacement.idl: Added.
1532         * Modules/plugins/QuickTimePluginReplacement.js: Added.
1533
1534         Allow plug-in replacement to be enabled at runtime.
1535         * bindings/generic/RuntimeEnabledFeatures.h:
1536         (WebCore::RuntimeEnabledFeatures::setPluginReplacementEnabled):
1537         (WebCore::RuntimeEnabledFeatures::pluginReplacementEnabled):
1538
1539         * bindings/js/JSDOMBinding.h:
1540         (WebCore::toJS): Add toJS(... const String& ...).
1541
1542         * bindings/js/JSPluginElementFunctions.cpp:
1543         (WebCore::pluginScriptObject): Give a plug-in replacement a first shot at defining the
1544             script interface.
1545
1546         * html/HTMLEmbedElement.cpp:
1547         (WebCore::HTMLEmbedElement::updateWidget): Call base class requestObject.
1548
1549         * html/HTMLMediaElement.cpp:
1550         (HTMLMediaElement::fileSize): New, passthrough to media engine.
1551         * html/HTMLMediaElement.h:
1552
1553         * html/HTMLObjectElement.cpp:
1554         (WebCore::HTMLObjectElement::updateWidget): Call base class requestObject.
1555
1556         Moved some logic that was previously used only for creating a plug-in snapshot to the base
1557         class so it can be shared by a plug-in replacement.
1558         * html/HTMLPlugInElement.cpp:
1559         (WebCore::HTMLPlugInElement::HTMLPlugInElement): Initialize timer used to swap renderers.
1560         (WebCore::HTMLPlugInElement::createRenderer): Allow plug-in replacement to create the renderer.
1561         (WebCore::HTMLPlugInElement::swapRendererTimerFired): Create a shadow root.
1562         (WebCore::HTMLPlugInElement::setDisplayState): Set the new state, prime the swap renderer 
1563             timer if necessary.
1564         (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot): Tell the plug-in replacement to
1565             install itself in the new shadow DOM.
1566         (WebCore::registeredPluginReplacements): Return vector of all registered plug-in replacements.
1567         (WebCore::registerPluginReplacement): Add a plug-in replacement.
1568         (WebCore::pluginReplacementForType): Find a plug-in replacement for a MIME type.
1569         (WebCore::HTMLPlugInElement::requestObject): If there is a plug-in replacement for the MIME type,
1570             create it and set the display state.
1571         (WebCore::HTMLPlugInElement::scriptObjectForPluginReplacement): Return the script object for 
1572             the current plug-in replacement, if any.
1573         * html/HTMLPlugInElement.h:
1574
1575         Move some plug-in snapshot code into the base class.
1576         * html/HTMLPlugInImageElement.cpp:
1577         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): No need to initialize timer.
1578         (WebCore::HTMLPlugInImageElement::setDisplayState): Call base class.
1579         (WebCore::HTMLPlugInImageElement::createRenderer): Ditto.
1580         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Ditto.
1581         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Remove unnecessary class name.
1582         (WebCore::HTMLPlugInImageElement::requestObject): New.
1583         * html/HTMLPlugInImageElement.h:
1584
1585         * html/HTMLVideoElement.h: Make createRenderer public so the QuickTime plug-in replacement can
1586             call it.
1587
1588         * platform/graphics/MediaPlayer.cpp:
1589         (WebCore::MediaPlayer::fileSize): New.
1590         * platform/graphics/MediaPlayer.h:
1591         * platform/graphics/MediaPlayerPrivate.h:
1592
1593         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1594         (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): totalBytes returns an unsigned long long.
1595         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1596         (WebCore::MediaPlayerPrivateAVFoundation::fileSize):
1597
1598         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1599         (WebCore::MediaPlayerPrivateAVFoundationCF::totalBytes): Return an unsigned long long.
1600         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1601
1602         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1603         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1604         (WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes): Ditto.
1605
1606         * testing/InternalSettings.cpp:
1607         (WebCore::InternalSettings::Backup::Backup): Backup the plug-in replacement runtime setting.
1608         (WebCore::InternalSettings::Backup::restoreTo): Restore it.
1609         (WebCore::InternalSettings::setPluginReplacementEnabled): Set it.
1610         * testing/InternalSettings.h:
1611         * testing/InternalSettings.idl:
1612
1613 2013-11-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1614
1615         Adding MediaConstraintsMock class
1616         https://bugs.webkit.org/show_bug.cgi?id=124902
1617
1618         Reviewed by Eric Carlson.
1619
1620         Validate constraints used in RTCPeerConnection LayoutTests
1621
1622         Existing test was updated.
1623
1624         * CMakeLists.txt:
1625         * GNUmakefile.list.am:
1626         * platform/mock/MediaConstraintsMock.cpp: Added.
1627         * platform/mock/MediaConstraintsMock.h: Added.
1628         * platform/mock/MockMediaStreamCenter.cpp:
1629         (WebCore::MockMediaStreamCenter::validateRequestConstraints): Now using MediaConstraintsMock
1630         (WebCore::MockMediaStreamCenter::createMediaStream): Ditto.
1631         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1632         (WebCore::RTCPeerConnectionHandlerMock::initialize): Ditto.
1633
1634 2013-11-27  Bear Travis  <betravis@adobe.com>
1635
1636         [CSS Shapes] Shape-Inside Should Default to 'auto'
1637         https://bugs.webkit.org/show_bug.cgi?id=124851
1638
1639         Reviewed by Alexandru Chiculita.
1640
1641         The current shape-inside specification has the property default to the 'auto'
1642         value, not 'outside-shape'.
1643
1644         Updated tests are under fast/shapes.
1645
1646         * rendering/style/RenderStyle.cpp:
1647         * rendering/style/RenderStyle.h:
1648
1649 2013-11-27  Hans Muller  <hmuller@adobe.com>
1650
1651         [CSS Shapes] shape-inside rectangle layout can fail
1652         https://bugs.webkit.org/show_bug.cgi?id=124784
1653
1654         Reviewed by Andreas Kling.
1655
1656         Apply LayoutUnit::fromFloatCeil() consistently in RectangleShape::firstIncludedIntervalLogicalTop().
1657
1658         Test: fast/shapes/shape-inside/shape-inside-subpixel-rectangle-top.html
1659
1660         * rendering/shapes/RectangleShape.cpp:
1661         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
1662
1663 2013-11-27  Nick Diego Yamane  <nick.yamane@openbossa.org>
1664
1665         Remove Qt-specific .qrc files
1666         https://bugs.webkit.org/show_bug.cgi?id=124944
1667
1668         Reviewed by Andreas Kling.
1669
1670         No new tests needed.
1671
1672         * WebCore.qrc: Removed.
1673
1674 2013-11-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1675
1676         [GStreamer] Invalid command line error when visiting www.chessbase.com
1677         https://bugs.webkit.org/show_bug.cgi?id=124715
1678
1679         Reviewed by Philippe Normand.
1680
1681         We were not handling the HTTP errors in the WebKit GStreamer
1682         source and therefore the 404 error page was being 'decoded'. As no
1683         decoder could be found (for obvious reasons), playback failed, but
1684         it should be failing for the source not being found instead of the
1685         decoding problem.
1686
1687         Test: http/tests/media/video-error-does-not-exist.html
1688
1689         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1690         (StreamingClient::handleResponseReceived): Handle HTTP errors in
1691         the source and raise a GStreamer error to the pipeline.
1692
1693 2013-11-14  Sergio Villar Senin  <svillar@igalia.com>
1694
1695         [CSS Grid Layout] Fix positioning of grid items with margins
1696         https://bugs.webkit.org/show_bug.cgi?id=124345
1697
1698         Reviewed by David Hyatt.
1699
1700         From Blink r157925 and r158041 by <jchaffraix@chromium.org>
1701
1702         Test: fast/css-grid-layout/grid-item-margin-resolution.html
1703
1704         Adds margin start/before to the positions of grid items (removing
1705         several FIXME's in the current code). This means calling
1706         findChildLogicalPosition() after the layout in order to have the
1707         right values for the margins.
1708
1709         In order to match flexbox and author's intents we're also
1710         including the margins of grid items in the intrinsic size of the
1711         grid. That's why flexbox's marginLogicalPositionForChild() is
1712         moved up to RenderBlock in order to share it with RenderGrid.
1713
1714         * rendering/RenderBlock.cpp:
1715         (WebCore::RenderBlock::marginIntrinsicLogicalWidthForChild): Moved
1716         from RenderFlexibleBox::marginLogicalWidthForChild().
1717         * rendering/RenderBlock.h:
1718         * rendering/RenderFlexibleBox.cpp:
1719         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
1720         * rendering/RenderGrid.cpp:
1721         (WebCore::RenderGrid::computePreferredTrackWidth):
1722         (WebCore::RenderGrid::layoutGridItems):
1723         (WebCore::RenderGrid::findChildLogicalPosition):
1724
1725 2013-11-26  Sergio Villar Senin  <svillar@igalia.com>
1726
1727         [CSS Grid Layout] Support grid-definition-{rows|columns} repeat() syntax
1728         https://bugs.webkit.org/show_bug.cgi?id=103312
1729
1730         Reviewed by Andreas Kling.
1731
1732         Added support for the repeat() syntax inside
1733         grid-definition-{rows|columns} by just adding the repeated values
1734         to our list of column|row definitions.
1735
1736         The parsing of <track-name> was refactored in a new function as
1737         it's used now in three different places. The <track-size> parsing
1738         was also refactored to share it with the repeat() parsing.
1739
1740         Test: fast/css-grid-layout/grid-element-repeat-get-set.html
1741
1742         * css/CSSParser.cpp:
1743         (WebCore::CSSParser::parseValue):
1744         (WebCore::CSSParser::parseGridTrackNames):
1745         (WebCore::CSSParser::parseGridTrackList):
1746         (WebCore::CSSParser::parseGridTrackRepeatFunction):
1747         (WebCore::CSSParser::parseGridTrackSize):
1748         * css/CSSParser.h:
1749
1750 2013-11-26  Marcelo Lira  <marcelo.lira@openbossa.org>
1751
1752         Nix upstreaming - Adding build files and supporting scripts
1753         https://bugs.webkit.org/show_bug.cgi?id=118367
1754
1755         Reviewed by Ryosuke Niwa.
1756
1757         No new tests needed.
1758
1759         * CMakeLists.txt:
1760         * PlatformNix.cmake: Added.
1761
1762 2013-11-26  Tim Horton  <timothy_horton@apple.com>
1763
1764         Don't parent the TileController root layer in two places
1765         https://bugs.webkit.org/show_bug.cgi?id=124873
1766
1767         Reviewed by Brent Fulgham.
1768
1769         * platform/graphics/ca/mac/TileController.mm:
1770         (WebCore::TileController::TileController):
1771         The TileController's layer is already parented by callers of
1772         TileController::create, and in a special way. TileController
1773         shouldn't parent itself, anyway...
1774
1775 2013-11-26  Nick Diego Yamane  <nick.yamane@openbossa.org>
1776
1777         [MediaStream API] HTMLMediaElement should be able to use MediaStream as source
1778         https://bugs.webkit.org/show_bug.cgi?id=121943
1779
1780         Reviewed by Eric Carlson.
1781
1782         Implement MediaStream direct assignment to Media Elements using the new 'srcObject'
1783         attribute: http://www.w3.org/TR/mediacapture-streams/#direct-assignment-to-media-elements
1784
1785         Test: fast/mediastream/MediaStream-MediaElement-srcObject.html
1786
1787         * CMakeLists.txt: Added new HTMLMediaElementMediaStream.h and .cpp to cmake build.
1788         * DerivedSources.make: Added HTMLMediaElementMediaStream.idl.
1789         * GNUmakefile.list.am: Added new HTMLMediaElementMediaStream* to autotools build.
1790         * WebCore.xcodeproj/project.pbxproj: Added new files.
1791         * Modules/mediastream/HTMLMediaElementMediaStream.cpp: Added.
1792         (WebCore::HTMLMediaElementMediaStream::srcObject): implements srcObject getter.
1793         (WebCore::HTMLMediaElementMediaStream::setSrcObject): implements srcObject setter.
1794         * Modules/mediastream/HTMLMediaElementMediaStream.h: Added.
1795         * Modules/mediastream/HTMLMediaElementMediaStream.idl: Added.
1796         * html/HTMLMediaElement.cpp:
1797         (WebCore::HTMLMediaElement::setSrcObject): This is an initial implementation, and
1798         is still incomplete, that will be addressed in a separate bug: https://webkit.org/b/124896
1799         * html/HTMLMediaElement.h: Added m_mediaStreamSrcObject class variable
1800         and its corresponding getter.
1801
1802 2013-11-26  Andreas Kling  <akling@apple.com>
1803
1804         Use child iterator to find operators in RenderMathMLRow::layout().
1805         <https://webkit.org/b/124108>
1806
1807         Replace manual children walk with childrenOfType<RenderMathMLBlock>.
1808         Minor update to fix build.
1809
1810         Reviewed by Martin Robinson.
1811
1812 2013-11-26  Andreas Kling  <akling@apple.com>
1813
1814         RenderObject: Inline isBody() and isHR().
1815         <https://webkit.org/b/124901>
1816
1817         Together these account for ~0.3% of samples on HTML5-8266.
1818         Almost all of it is call overhead.
1819
1820         Reviewed by Anders Carlsson.
1821
1822 2013-11-26  Bear Travis  <betravis@adobe.com>
1823
1824         [CSS Shapes] Layout using [<box> || <shape>] value
1825         https://bugs.webkit.org/show_bug.cgi?id=124428
1826
1827         Reviewed by David Hyatt.
1828
1829         When a box value is supplied, use it to size and position the shape. Otherwise,
1830         use a default value (content-box for shape-inside, margin-box for shape-outside).
1831         This patch extends the sizing and positioning code used for the box patch (Bug 124227)
1832         to also apply to shapes. With this patch, we also no longer use the box-sizing
1833         property to size and position shapes.
1834
1835         Tests: fast/shapes/shape-outside-floats/shape-outside-shape-boxes-001.html
1836                fast/shapes/shape-outside-floats/shape-outside-shape-boxes-002.html
1837                fast/shapes/shape-outside-floats/shape-outside-shape-boxes-003.html
1838
1839         * css/CSSComputedStyleDeclaration.cpp:
1840         (WebCore::ComputedStyleExtractor::propertyValue): Adjust for ShapeValues storing
1841         BasicShape::ReferenceBox as their box value, rather than a CSSValueID.
1842         * css/DeprecatedStyleBuilder.cpp:
1843         (WebCore::ApplyPropertyShape::applyValue): Ditto.
1844         * rendering/shapes/ShapeInfo.h:
1845         (WebCore::ShapeInfo::setShapeSize): Adjust for BasicShapes with reference boxes
1846         as well as plain box values. Also, remove old box-sizing code.
1847         (WebCore::ShapeInfo::logicalTopOffset): Ditto.
1848         (WebCore::ShapeInfo::logicalLeftOffset): Ditto.
1849         * rendering/shapes/ShapeInsideInfo.h:
1850         * rendering/shapes/ShapeOutsideInfo.h:
1851         * rendering/style/ShapeValue.h:
1852         (WebCore::ShapeValue::createBoxValue): Adjust for boxes being stored as
1853         BasicShape::ReferenceBoxes.
1854         (WebCore::ShapeValue::box): Ditto.
1855         (WebCore::ShapeValue::ShapeValue): Ditto.
1856
1857 2013-11-26  Brian J. Burg  <burg@cs.washington.edu>
1858
1859         ImageBuffer::create should return a std::unique_ptr instead of OwnPtr.
1860         https://bugs.webkit.org/show_bug.cgi?id=124822
1861
1862         Reviewed by Andreas Kling.
1863
1864         Replace all uses of OwnPtr<ImageBuffer> and PassOwnPtr<ImageBuffer> with
1865         std::unique_ptr<ImageBuffer>. Replace calls to OwnPtr::clear() and
1866         OwnPtr::release() with reset() and std::move(). Remove unnecessary includes.
1867
1868         No new tests. This is a mechanical refactoring.
1869
1870         * css/CSSFilterImageValue.cpp:
1871         (WebCore::CSSFilterImageValue::image):
1872         * html/HTMLCanvasElement.cpp:
1873         (WebCore::HTMLCanvasElement::setSurfaceSize):
1874         * html/HTMLCanvasElement.h:
1875         * html/canvas/CanvasRenderingContext2D.cpp:
1876         (WebCore::CanvasRenderingContext2D::createCompositingBuffer):
1877         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
1878         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill):
1879         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1880         * html/canvas/CanvasRenderingContext2D.h:
1881         * html/canvas/WebGLRenderingContext.cpp:
1882         (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache):
1883         (WebCore::WebGLRenderingContext::LRUImageBufferCache::imageBuffer):
1884         * html/canvas/WebGLRenderingContext.h:
1885         * html/shadow/MediaControlElements.cpp:
1886         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
1887         * page/Frame.cpp:
1888         (WebCore::Frame::nodeImage):
1889         (WebCore::Frame::dragImageForSelection):
1890         * platform/graphics/BitmapImage.cpp:
1891         (WebCore::BitmapImage::drawPattern):
1892         * platform/graphics/CrossfadeGeneratedImage.cpp:
1893         (WebCore::CrossfadeGeneratedImage::drawPattern):
1894         * platform/graphics/GradientImage.h:
1895         * platform/graphics/GraphicsContext.cpp:
1896         (WebCore::GraphicsContext::createCompatibleBuffer):
1897         * platform/graphics/GraphicsContext.h:
1898         * platform/graphics/ImageBuffer.cpp:
1899         (WebCore::ImageBuffer::createCompatibleBuffer):
1900         * platform/graphics/ImageBuffer.h:
1901         (WebCore::ImageBuffer::create):
1902         * platform/graphics/ShadowBlur.cpp:
1903         * platform/graphics/cg/ImageBufferCG.cpp:
1904         (WebCore::ImageBuffer::putByteArray):
1905         * platform/graphics/cg/PDFDocumentImage.h:
1906         * platform/graphics/filters/FETile.cpp:
1907         (WebCore::FETile::platformApplySoftware):
1908         * platform/graphics/filters/Filter.h:
1909         (WebCore::Filter::setSourceImage):
1910         * platform/graphics/filters/FilterEffect.cpp:
1911         (WebCore::FilterEffect::clearResult):
1912         * platform/graphics/filters/FilterEffect.h:
1913         * platform/graphics/texmap/TextureMapper.cpp:
1914         (WebCore::BitmapTexture::updateContents):
1915         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1916         * rendering/InlineTextBox.cpp:
1917         (WebCore::InlineTextBox::paintDecoration):
1918         * rendering/RenderBoxModelObject.cpp:
1919         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1920         * rendering/RenderThemeMac.mm:
1921         (WebCore::RenderThemeMac::paintProgressBar):
1922         * rendering/shapes/Shape.cpp:
1923         (WebCore::Shape::createShape):
1924         * rendering/svg/RenderSVGImage.cpp:
1925         (WebCore::RenderSVGImage::invalidateBufferedForeground):
1926         * rendering/svg/RenderSVGImage.h:
1927         * rendering/svg/RenderSVGResourceClipper.cpp:
1928         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1929         * rendering/svg/RenderSVGResourceClipper.h:
1930         * rendering/svg/RenderSVGResourceFilter.cpp:
1931         (WebCore::RenderSVGResourceFilter::applyResource):
1932         (WebCore::RenderSVGResourceFilter::postApplyResource):
1933         * rendering/svg/RenderSVGResourceFilter.h:
1934         * rendering/svg/RenderSVGResourceGradient.cpp: Remove method parameter wrapping/indentation.
1935         (WebCore::createMaskAndSwapContextForTextGradient):
1936         (WebCore::clipToTextMask):
1937         (WebCore::RenderSVGResourceGradient::applyResource):
1938         * rendering/svg/RenderSVGResourceGradient.h:
1939         * rendering/svg/RenderSVGResourceMasker.cpp:
1940         (WebCore::RenderSVGResourceMasker::applyResource):
1941         * rendering/svg/RenderSVGResourceMasker.h:
1942         * rendering/svg/RenderSVGResourcePattern.cpp: Remove method parameter wrapping/indentation.
1943         (WebCore::RenderSVGResourcePattern::buildPattern):
1944         (WebCore::RenderSVGResourcePattern::createTileImage):
1945         * rendering/svg/RenderSVGResourcePattern.h: Remove method parameter wrapping/indentation.
1946         * rendering/svg/SVGRenderingContext.cpp:
1947         (WebCore::SVGRenderingContext::createImageBuffer):
1948         (WebCore::SVGRenderingContext::createImageBufferForPattern):
1949         (WebCore::SVGRenderingContext::clipToImageBuffer):
1950         (WebCore::SVGRenderingContext::bufferForeground):
1951         * rendering/svg/SVGRenderingContext.h:
1952         * svg/graphics/SVGImage.cpp:
1953         (WebCore::SVGImage::nativeImageForCurrentFrame):
1954         (WebCore::SVGImage::drawPatternForContainer):
1955
1956 2013-11-26  Eric Carlson  <eric.carlson@apple.com>
1957
1958         video.currentSrc should return empty when no resource is loaded
1959         https://bugs.webkit.org/show_bug.cgi?id=124898
1960
1961         Reviewed by Dan Bernstein.
1962
1963         Test: media/video-currentsrc-cleared.html
1964
1965         * html/HTMLMediaElement.cpp:
1966         (WebCore::HTMLMediaElement::prepareForLoad): Set m_currentSrc to empty in 
1967             preparation for attempting to load a new url.
1968
1969 2013-11-26  Hans Muller  <hmuller@adobe.com>
1970
1971         [CSS Shapes] Support for shape-margin in BoxShape
1972         https://bugs.webkit.org/show_bug.cgi?id=124788
1973
1974         Reviewed by Andreas Kling.
1975
1976         Corrected BoxShape's internal shape-margin/padding bounds FloatRoundedRect
1977         initialization. Tests for the padding bounds will be added when the rest of
1978         shape-padding for box shapes implementation is ready.
1979
1980         Tests: fast/shapes/shape-outside-floats/shape-outside-margin-boxes-001.html
1981                fast/shapes/shape-outside-floats/shape-outside-margin-boxes-002.html
1982
1983         * rendering/shapes/BoxShape.cpp: Use constructor shape-margin,shape-padding parameters.
1984         (WebCore::BoxShape::BoxShape):
1985         * rendering/shapes/BoxShape.h:
1986         * rendering/shapes/Shape.cpp:
1987         (WebCore::createBoxShape): Pass the shape-margin and shape-padding values along to the BoxShape constructor.
1988         (WebCore::Shape::createShape): Ditto.
1989
1990 2013-11-26  Nick Diego Yamane  <nick.yamane@openbossa.org>
1991
1992         Remove unnecessary webaudio include from MediaStreamSource header
1993         https://bugs.webkit.org/show_bug.cgi?id=124897
1994
1995         Reviewed by Eric Carlson.
1996
1997         AudioDestinationConsumer.h is included but not used anywhere in
1998         MediaStreamSource implementation.
1999
2000         * platform/mediastream/MediaStreamSource.h:
2001
2002 2013-11-26  Andreas Kling  <akling@apple.com>
2003
2004         Avoid unnecessary copy-on-write in FillLayer style application.
2005         <https://webkit.org/b/124878>
2006
2007         We ended up with a lot of cloned StyleBackgroundData objects on
2008         HTML5-8266. This happened because we always forced a copy-on-write
2009         when applying background-image:inherit / background-image:initial.
2010
2011         This patch adds early returns to both functions. In the "inherit"
2012         case, we bail early if the target style already has the same fill
2013         layer data as its parent style.
2014
2015         In the "initial" case, we optimize for the single-FillLayer case
2016         and add an early return if the relevant value is either unset or
2017         equal to the templatized initial value.
2018
2019         2.46 MB progression on HTML5-8266 locally.
2020
2021         Reviewed by Antti Koivisto.
2022
2023 2013-11-26  Antoine Quint  <graouts@apple.com>
2024
2025         Web Inspector: Allow showing a context menu on all mouse events.
2026         https://bugs.webkit.org/show_bug.cgi?id=124747
2027
2028         Reviewed by Joseph Pecoraro.
2029
2030         Add a new InspectorFrontendHost::dispatchEventAsContextMenuEvent(Event*) method
2031         to let the inspector front-end dispatch a native contextmenu event that will allow
2032         for a context menu to be shown from within a non-contextmenu event handler.
2033
2034         * inspector/InspectorFrontendHost.cpp:
2035         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
2036         Check that we're dealing with a mouse event, get the frame for the event target
2037         and the event's location to call ContextMenuController::showContextMenuAt()
2038         which will handle the new contextmenu event dispatch to the original event target.
2039
2040         * inspector/InspectorFrontendHost.h:
2041         * inspector/InspectorFrontendHost.idl:
2042
2043 2013-11-25  Sam Weinig  <sam@webkit.org>
2044
2045         Convert some Shape code to use references
2046         https://bugs.webkit.org/show_bug.cgi?id=124876
2047
2048         Reviewed by Andreas Kling.
2049
2050         * inspector/InspectorOverlay.cpp:
2051         * rendering/FloatingObjects.cpp:
2052         * rendering/LayoutState.cpp:
2053         * rendering/RenderBlock.cpp:
2054         * rendering/RenderBlock.h:
2055         * rendering/RenderBlockLineLayout.cpp:
2056         * rendering/RenderBox.cpp:
2057         * rendering/RenderBox.h:
2058         * rendering/line/BreakingContextInlineHeaders.h:
2059         * rendering/line/LineWidth.cpp:
2060         * rendering/shapes/ShapeInfo.cpp:
2061         * rendering/shapes/ShapeInfo.h:
2062         * rendering/shapes/ShapeInsideInfo.cpp:
2063         * rendering/shapes/ShapeInsideInfo.h:
2064         * rendering/shapes/ShapeOutsideInfo.cpp:
2065         * rendering/shapes/ShapeOutsideInfo.h:
2066         Replace yet more pointers with references.
2067
2068 2013-11-25  Simon Pena  <simon.pena@samsung.com>
2069
2070         [EFL] X11Helper::createPixmap doesn't initialise out value handleId
2071         https://bugs.webkit.org/show_bug.cgi?id=124722
2072
2073         Reviewed by Gyuyoung Kim.
2074
2075         The overloaded functions X11Helper::createPixmap don't initialise out
2076         value handleId, and they do early returns on error situations. Since
2077         the functions are void and they don't communicate their failure in any
2078         way, returning an out value without initialising it could make the
2079         error go farther unnoticed. With the variable being initialised, it can
2080         be reliably checked for errors when the function returns.
2081
2082         * platform/graphics/surfaces/glx/X11Helper.cpp:
2083         (WebCore::X11Helper::createPixmap): Initialise handleId to 0.
2084
2085 2013-11-25  Nick Diego Yamane  <nick.yamane@openbossa.org>
2086
2087         Mark URLRegistry's lookup() as const and its child classes as final
2088         https://bugs.webkit.org/show_bug.cgi?id=124865
2089
2090         Reviewed by Eric Carlson.
2091
2092         No new tests needed. No behavior changes.
2093
2094         * Modules/mediasource/MediaSourceRegistry.cpp:
2095         (WebCore::MediaSourceRegistry::lookup): marked as const.
2096         * Modules/mediasource/MediaSourceRegistry.h: MediaSourceRegistry
2097         marked as final.
2098         * Modules/mediastream/MediaStreamRegistry.cpp:
2099         (WebCore::MediaStreamRegistry::lookup): marked as const.
2100         * Modules/mediastream/MediaStreamRegistry.h: MediaStreamRegistry
2101         marked as final.
2102         * fileapi/Blob.cpp:
2103         * html/URLRegistry.h: lookup() marked as const.
2104         (WebCore::URLRegistry::lookup): marked as const.
2105
2106 2013-11-25  Sergio Correia  <sergio.correia@openbossa.org>
2107
2108         [MediaStream] Use std::unique_ptr instead of OwnPtr/PassOwnPtr
2109         https://bugs.webkit.org/show_bug.cgi?id=124858
2110
2111         Reviewed by Eric Carlson.
2112
2113         Another step of the OwnPtr/PassOwnPtr => std::unique_ptr conversion,
2114         now targeting mediastream-related code.
2115
2116         No new tests, covered by existing ones.
2117
2118         * Modules/mediastream/RTCDTMFSender.cpp:
2119         * Modules/mediastream/RTCDTMFSender.h:
2120         * Modules/mediastream/RTCDataChannel.cpp:
2121         * Modules/mediastream/RTCDataChannel.h:
2122         * Modules/mediastream/RTCPeerConnection.cpp:
2123         * Modules/mediastream/RTCPeerConnection.h:
2124         * platform/mediastream/MediaStreamSource.cpp:
2125         * platform/mediastream/RTCPeerConnectionHandler.cpp:
2126         * platform/mediastream/RTCPeerConnectionHandler.h:
2127         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
2128         * platform/mock/RTCNotifiersMock.cpp:
2129         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2130         * platform/mock/RTCPeerConnectionHandlerMock.h:
2131
2132 2013-11-25  Nick Diego Yamane  <nick.yamane@openbossa.org>
2133
2134         MediaStreamRegistry should store MediaStreams instead of MediaStreamPrivates
2135         https://bugs.webkit.org/show_bug.cgi?id=124860
2136
2137         Reviewed by Eric Carlson.
2138
2139         MediaStreamRegistry::lookup() should return a MediaStream instead of MediaStreamPrivate.
2140
2141         No new tests needed. No behavior changes.
2142
2143         * Modules/mediastream/MediaStreamRegistry.cpp:
2144         (WebCore::MediaStreamRegistry::registerURL): m_privateStreams -> m_mediaStreams
2145         (WebCore::MediaStreamRegistry::unregisterURL): Ditto.
2146         (WebCore::MediaStreamRegistry::lookup): Override URLRegistry::lookup() instead of add a
2147         new method MediaStream::lookupMediaStreamPrivate().
2148         * Modules/mediastream/MediaStreamRegistry.h:
2149         * html/HTMLMediaElement.cpp:
2150         (HTMLMediaElement::loadResource): call lookup() instead of lookupMediaStreamPrivate()
2151
2152 2013-11-25  peavo@outlook.com  <peavo@outlook.com>
2153
2154         [WinCairo] Compile fails when GSTREAMER is not used.
2155         https://bugs.webkit.org/show_bug.cgi?id=124853
2156
2157         Reviewed by Philippe Normand.
2158
2159         * platform/graphics/gstreamer/GStreamerUtilities.cpp: Don't include GStreamerUtilities.h when GSTREAMER is not used.
2160
2161 2013-11-25  Andreas Kling  <akling@apple.com>
2162
2163         Deduplicate shortish Text node strings during tree construction.
2164         <https://webkit.org/b/124855>
2165
2166         Let HTMLConstructionSite keep a hash set of already seen strings over
2167         its lifetime. Use this to deduplicate the strings inside Text nodes
2168         for any string up to 64 characters of length.
2169
2170         This optimization already sort-of existed for whitespace-only Texts,
2171         but those are laundered in the AtomicString table which we definitely
2172         don't want to pollute with every single Text. It might be a good idea
2173         to stop using the AtomicString table for all-whitespace Text too.
2174
2175         3.82 MB progression on HTML5-8266 locally.
2176
2177         Reviewed by Anders Carlsson.
2178
2179 2013-11-25  Nick Diego Yamane  <nick.yamane@openbossa.org>
2180
2181         Remove unnecessary MediaStreamTrackDescriptor forward declaration
2182         https://bugs.webkit.org/show_bug.cgi?id=124854
2183
2184         Reviewed by Eric Carlson.
2185
2186         No new tests needed. No behavior changed.
2187
2188         * Modules/mediastream/VideoStreamTrack.h:
2189
2190 2013-11-25  Robert Hogan  <robert@webkit.org>
2191
2192         Remove code now unnecessary after r159575
2193         https://bugs.webkit.org/show_bug.cgi?id=124809
2194
2195         Reviewed by Antti Koivisto.
2196
2197         Covered by existing tests fast/block/margin-collapse/self-collapsing-block-with-float*
2198
2199         * rendering/line/LineBreaker.cpp:
2200         (WebCore::LineBreaker::skipLeadingWhitespace):
2201
2202 2013-11-25  Laszlo Vidacs  <lac@inf.u-szeged.hu>
2203
2204         Vertical border spacing is doubled between table row groups
2205         https://bugs.webkit.org/show_bug.cgi?id=20040
2206
2207         Reviewed by Csaba Osztrogonác.
2208
2209         Based on Chromium fix https://chromium.googlesource.com/chromium/blink/+/eb615069267f895c59bc576f9d65b3fa5add41e9
2210
2211         Rebaseline needed for table related tests (100+).
2212
2213         * rendering/RenderTableSection.cpp:
2214         (WebCore::RenderTableSection::calcRowLogicalHeight):
2215
2216 2013-11-25  Andres Gomez  <agomez@igalia.com>
2217
2218         [GStreamer] Seeking fails on media content provided by servers not supporting Range requests
2219         https://bugs.webkit.org/show_bug.cgi?id=85994
2220
2221         Reviewed by Philippe Normand.
2222
2223         Based on the patch written by Andre Moreira Magalhaes.
2224
2225         When the GStreamer web source was doing a "Range" request we were
2226         expecting to receive a 206 status reply with the "Content-Range"
2227         header and just the requested data. Supporting "Range" requests is
2228         not mandatory so, for the servers not supporting it they will be
2229         replying with a 200 status and the whole content of the media
2230         element. Now, we are properly handling these replies too.
2231
2232         Test: http/tests/media/media-seeking-no-ranges-server.html
2233
2234         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2235         (StreamingClient::handleResponseReceived): Do not fail when
2236         receiving 200 as response for HTTP range requests.
2237         (StreamingClient::handleDataReceived): Manually seek on stream
2238         when receiving the full data after a seek.
2239
2240 2013-11-25  Radu Stavila  <stavila@adobe.com>
2241
2242         Removed obsolete FIXME after the landing of visual overflow patch (https://bugs.webkit.org/show_bug.cgi?id=118665).
2243         https://bugs.webkit.org/show_bug.cgi?id=124833
2244
2245         Reviewed by Mihnea Ovidenie.
2246
2247         * rendering/RenderRegion.cpp:
2248         (WebCore::RenderRegion::layoutBlock):
2249
2250 2013-11-18  Sergio Villar Senin  <svillar@igalia.com>
2251
2252         [CSS Grid Layout] Cache several vectors to avoid malloc/free churn
2253         https://bugs.webkit.org/show_bug.cgi?id=123995
2254
2255         Reviewed by Dean Jackson.
2256
2257         From Blink r158228 by <jchaffraix@chromium.org>
2258
2259         Laying-out the grid items means a lot of calls to
2260         distributeSpaceToTracks() and
2261         resolveContentBasedTrackSizingFunctionsForItems() as they're
2262         called in a loop. This means that there is a lot of malloc/free
2263         going on there. By moving the vectors used by these methods to a
2264         new class which is kept during the whole layout process we save a
2265         lot of those calls.
2266
2267         This obviously mean that the price we pay for a significant
2268         perfomance improvement is that we keep the maximum allocation till
2269         the end of each layout, but it's an amount of memory that we have
2270         to allocate anyway. The improvement in the
2271         auto-grid-lots-of-data.html perf test is ~24% (165 runs/s vs 207
2272         runs/s).
2273
2274         No new tests required as we're just refactoring code to a new
2275         helper class. Nevertheless the performance improvement is backed
2276         by the perf test mentioned above.
2277
2278         * rendering/RenderGrid.cpp:
2279         (WebCore::RenderGrid::GridSizingData::GridSizingData):
2280         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
2281         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2282         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2283         (WebCore::RenderGrid::distributeSpaceToTracks):
2284         (WebCore::RenderGrid::layoutGridItems):
2285         (WebCore::RenderGrid::findChildLogicalPosition):
2286         * rendering/RenderGrid.h:
2287
2288 2013-11-24  Brady Eidson  <beidson@apple.com>
2289
2290         DatabaseProcess: Add "UniqueIDBDatabase" that multiple WebProcesses can connect to
2291         https://bugs.webkit.org/show_bug.cgi?id=124819
2292
2293         Reviewed by Dan Bernstein.
2294
2295         * Modules/indexeddb/IDBDatabaseBackend.cpp:
2296         (WebCore::IDBDatabaseBackend::~IDBDatabaseBackend): Unregister from the IDBFactory.
2297
2298 2013-11-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2299
2300         Generate toHTMLMarquee|OListElement() to cleanup static_cast<>
2301         https://bugs.webkit.org/show_bug.cgi?id=124707
2302
2303         Reviewed by Darin Adler.
2304
2305         As a step to use toFoo(), we need to generate toHTMLMarquee|OListElement().
2306         Besides this patch cleans up remaining static_cast<> usage.
2307
2308         No new tests, no behavior changes.
2309
2310         * css/StyleResolver.cpp:
2311         (WebCore::StyleResolver::State::initElement):
2312         (WebCore::StyleResolver::locateCousinList):
2313         (WebCore::StyleResolver::findSiblingForStyleSharing):
2314         * dom/Attr.cpp:
2315         (WebCore::Attr::style):
2316         * dom/Element.cpp:
2317         (WebCore::Element::removeAttribute):
2318         * editing/ApplyStyleCommand.cpp:
2319         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
2320         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
2321         * editing/EditingStyle.cpp:
2322         (WebCore::EditingStyle::wrappingStyleForSerialization):
2323         * editing/Editor.cpp:
2324         (WebCore::Editor::applyEditingStyleToElement):
2325         * editing/ReplaceSelectionCommand.cpp:
2326         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2327         * html/HTMLMarqueeElement.h:
2328         * html/HTMLOListElement.h:
2329         * html/HTMLTagNames.in:
2330         * inspector/InspectorCSSAgent.cpp:
2331         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2332         * inspector/InspectorOverlay.cpp:
2333         (WebCore::buildObjectForElementInfo):
2334         * page/PageSerializer.cpp:
2335         (WebCore::PageSerializer::serializeFrame):
2336         * rendering/RenderCounter.cpp:
2337         (WebCore::planCounter):
2338         * rendering/RenderLayer.cpp:
2339         (WebCore::RenderLayer::resize):
2340         * rendering/RenderListItem.cpp:
2341         (WebCore::RenderListItem::calcValue):
2342         (WebCore::RenderListItem::updateListMarkerNumbers):
2343         * rendering/RenderMarquee.cpp:
2344         (WebCore::RenderMarquee::marqueeSpeed):
2345
2346 2013-11-24  Tim Horton  <timothy_horton@apple.com>
2347
2348         REGRESSION (r156291): TileController tiles don't always repaint when they resize
2349         https://bugs.webkit.org/show_bug.cgi?id=124796
2350
2351         Reviewed by Simon Fraser.
2352
2353         In removing platformCALayerDidCreateTiles, r156291 also removed
2354         the call to setNeedsDisplay when tiles are resized, without
2355         putting it somewhere else.
2356
2357         * platform/graphics/ca/mac/TileController.mm:
2358         (WebCore::TileController::setNeedsDisplay):
2359         Use hasStaleContent when invalidating a whole tile, just
2360         like we do for partial tile repaints.
2361
2362         (WebCore::TileController::setTileNeedsDisplayInRect):
2363         Mark hasStaleContent for any unparented layers, so they'll be painted
2364         when they are reparented.
2365
2366         (WebCore::TileController::ensureTilesForRect):
2367         Invalidate the whole tile when it changes size.
2368
2369 2013-11-23  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2370
2371         [GStreamer] Remove 0.10 codepath
2372         https://bugs.webkit.org/show_bug.cgi?id=124534
2373
2374         Reviewed by Philippe Normand.
2375
2376         All GStreamer ports are using 1.0 now so we remove the 0.10
2377         codepath.
2378
2379         * GNUmakefile.list.am:
2380         * PlatformEfl.cmake:
2381         * PlatformGTK.cmake:
2382         * WebCore.vcxproj/WebCore.vcxproj:
2383         * WebCore.vcxproj/WebCore.vcxproj.filters: Removed
2384         GStreamerVersioning.
2385         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
2386         (onGStreamerWavparsePadAddedCallback): Removed.
2387         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
2388         Replaced webkitGstPipelineGetBus and removed 0.10 codepath.
2389         (WebCore::AudioDestinationGStreamer::~AudioDestinationGStreamer):
2390         Replaced webkitGstPipelineGetBus.
2391         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2392         (WebCore::copyGstreamerBuffersToAudioChannel):
2393         (WebCore::onAppsinkPullRequiredCallback): Removed 0.10 codepath.
2394         (WebCore::AudioFileReader::~AudioFileReader): Replaced
2395         webkitGstPipelineGetBus and removed 0.10 codepath.
2396         (WebCore::AudioFileReader::handleSample): Left as only codepath.
2397         (WebCore::AudioFileReader::handleBuffer): Removed.
2398         (WebCore::AudioFileReader::handleNewDeinterleavePad): Removed 0.10
2399         codepath.
2400         (WebCore::AudioFileReader::plugDeinterleave): Replaced
2401         getGstAudioCaps.
2402         (WebCore::AudioFileReader::decodeAudioForBusCreation): Replaced
2403         webkitGstPipelineGetBus.
2404         (WebCore::AudioFileReader::createBus): Removed 0.10 codepath.
2405         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2406         (getGStreamerMonoAudioCaps):
2407         (webKitWebAudioGStreamerChannelPosition): Removed 0.10 codepath.
2408         (webkit_web_audio_src_class_init): Replaced
2409         setGstElementClassMetadata.
2410         (webkit_web_audio_src_init):
2411         (webKitWebAudioSrcConstructed):
2412         (webKitWebAudioSrcFinalize):
2413         (webKitWebAudioSrcLoop): Removed 0.10 codepath.
2414         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
2415         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
2416         Removed checks for 1.0 as it is the only codepath now.
2417         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
2418         (WTF::GstElement):
2419         (WTF::GstPad):
2420         (WTF::GstPadTemplate):
2421         (WTF::GstTask):
2422         (WTF::GstBus):
2423         (WTF::GstElementFactory):
2424         (WTF::adoptGRef): Replaced gstObjectIsFloating.
2425         (WTF::refGRef): Replaced webkitGstObjectRefSink.
2426         (WTF::GstTagList):
2427         (WTF::GstSample): Removed checks for 1.0 as it is the only
2428         codepath now.
2429         * platform/graphics/gstreamer/GRefPtrGStreamer.h: Removed checks
2430         for 1.0 as it is the only codepath now.
2431         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2432         (WebCore::webkitGstGhostPadFromStaticTemplate):
2433         (WebCore::getVideoSizeAndFormatFromCaps):
2434         (WebCore::createGstBuffer):
2435         (WebCore::createGstBufferForData):
2436         (WebCore::getGstBufferDataPointer):
2437         (WebCore::mapGstBuffer):
2438         (WebCore::unmapGstBuffer): Moved here from GstVersioning and added
2439         to WebCore namespace.
2440         * platform/graphics/gstreamer/GStreamerUtilities.h:
2441         (WebCore::webkitGstCheckVersion): Moved here from GstVersioning
2442         and added to WebCore namespace.
2443         * platform/graphics/gstreamer/GStreamerVersioning.cpp: Removed.
2444         * platform/graphics/gstreamer/GStreamerVersioning.h: Removed.
2445         * platform/graphics/gstreamer/ImageGStreamer.h: Removed checks for
2446         1.0 as it is the only codepath now.
2447         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
2448         (ImageGStreamer::ImageGStreamer): Removed 0.10 codepath.
2449         (ImageGStreamer::~ImageGStreamer): Removed checks for 1.0 as it is
2450         the only codepath now.
2451         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
2452         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2453         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2454         Removed checks for 1.0 as it is the only codepath now.
2455         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2456         (WebCore::setAudioStreamPropertiesCallback): Removed 0.10 codepath.
2457         (WebCore::mediaPlayerPrivateTextChangedCallback): Removed checks
2458         for 1.0 as it is the only codepath now.
2459         (WebCore::MediaPlayerPrivateGStreamer::isAvailable): Replaced
2460         gPlaybinName.
2461         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
2462         Removed checks for 1.0 and replaced webkitGstPipelineGetBus.
2463         (WebCore::MediaPlayerPrivateGStreamer::duration): Removed 0.10
2464         codepath.
2465         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2466         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
2467         (WebCore::MediaPlayerPrivateGStreamer::textChanged):
2468         Removed checks for 1.0 as it is the only codepath now.
2469         (WebCore::MediaPlayerPrivateGStreamer::buffered): Replaced
2470         gPercentMax.
2471         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Removed
2472         0.10 codepath.
2473         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents):
2474         Removed checks for 1.0 as it is the only codepath now.
2475         (WebCore::MediaPlayerPrivateGStreamer::totalBytes): Removed 0.10
2476         codepath.
2477         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Replaced
2478         gPlaybinName and webkitGstPipelineGetBus and removed checks for
2479         1.0.
2480         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2481         Removed checks for 1.0 as it is the only codepath now.
2482         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2483         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
2484         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
2485         (WebCore::MediaPlayerPrivateGStreamerBase::paint): Removed 0.10
2486         codepath.
2487         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp:
2488         * platform/graphics/gstreamer/TextCombinerGStreamer.h:
2489         * platform/graphics/gstreamer/TextSinkGStreamer.cpp:
2490         * platform/graphics/gstreamer/TextSinkGStreamer.h:
2491         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2492         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Removed
2493         checks for 1.0 as it is the only codepath now.
2494         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2495         (webkitVideoSinkRender): Removed 0.10 codepath and added WebCore
2496         as createGstBuffer namespace.
2497         (webkitVideoSinkSetCaps): Removed 0.10 codepath.
2498         (webkitVideoSinkProposeAllocation): Removed checks for 1.0 as it
2499         is the only codepath now.
2500         (webkitVideoSinkMarshalVoidAndMiniObject): Removed as it was 0.10.
2501         (webkit_video_sink_class_init): Removed 0.10 codepath and replaced
2502         setGstElementClassMetadata.
2503         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
2504         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:
2505         Removed checks for 1.0 as it is the only codepath now.
2506         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
2507         (webkit_media_src_class_init): Replaced
2508         setGstElementClassMetadata.
2509         (webKitMediaSrcAddSrc): Added WebCore namespace to
2510         webkitGstGhostPadFromStaticTemplate.
2511         (MediaSourceClientGstreamer::didReceiveData): Added WebCore
2512         namespace to createGstBufferForData.
2513         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2514         Removed 0.10 codepath.
2515         (webKitWebSrcQuery): Removed as it was 0.10 only.
2516         (void webkit_web_src_class_init): Replaced setGstElementClassMetadata.
2517         (webkit_web_src_init): Removed haveAppSrc27 private attribute and
2518         0.10 codepath.
2519         (webKitWebSrcStop): Removed checks for 1.0 as it is the only
2520         codepath now.
2521         (webKitWebSrcSetProperty):
2522         (webKitWebSrcUriGetType):
2523         (webKitWebSrcGetProtocols):
2524         (webKitWebSrcGetUri):
2525         (webKitWebSrcSetUri): Removed 0.10 codepath.
2526         (StreamingClient::createReadBuffer): Removed checks for 1.0 and
2527         replaced getGstBufferSize.
2528         (StreamingClient::handleResponseReceived): Removed 0.10 codepath
2529         and replaced notifyGstTagsOnPad.
2530         (StreamingClient::handleDataReceived): Removed 0.10 codepath and
2531         replaced setGstBufferSize and gst_buffer_get_size.
2532
2533 2013-11-22  Jer Noble  <jer.noble@apple.com>
2534
2535         [Mac] Can't drag full-screen video to another monitor
2536         https://bugs.webkit.org/show_bug.cgi?id=124798
2537
2538         Reviewed by Geoffrey Garen.
2539
2540         Make full screen windows movable by default. Previously, we wanted non-movable full screen
2541         windows since they were in the same space and were just placed atop non-full screen windows.
2542         Now that all our supported Mac platforms have explicit full screen support, we can remove this
2543         non-movable restriction.
2544
2545         * platform/mac/WebCoreFullScreenWindow.mm:
2546         (-[WebCoreFullScreenWindow initWithContentRect:styleMask:backing:defer:]):
2547
2548 2013-11-22  Brent Fulgham  <bfulgham@apple.com>
2549
2550         [Win] Clean up ColorSpace handling in Windows code
2551         https://bugs.webkit.org/show_bug.cgi?id=124795
2552
2553         Reviewed by Tim Horton.
2554
2555         Functionality covered by existing fast/css/color test suite.
2556
2557         * platform/graphics/cg/GraphicsContextCG.cpp:
2558         (WebCore::safeRGBColorSpaceRef): Handle case of Windows CG implementation not
2559         handling sRGB correctly.
2560         (WebCore::sRGBColorSpaceRef): Use new helper function.
2561         * platform/graphics/win/FontCGWin.cpp:
2562         (WebCore::Font::drawGlyphs): Pass correct color space to fill functions.
2563         * platform/graphics/win/GraphicsContextCGWin.cpp:
2564         (WebCore::GraphicsContext::platformInit): Initialize color space to value passed
2565         via the style to the constructor.
2566
2567 2013-11-22  Alexey Proskuryakov  <ap@apple.com>
2568
2569         WebCrypto algorithms should check that key algorithm matches
2570         https://bugs.webkit.org/show_bug.cgi?id=123628
2571
2572         Reviewed by Anders Carlsson.
2573
2574         No change in behavior yet, because we have one algorithm per key class.
2575         Will be tested once more algorithms are added.
2576
2577         * WebCore.xcodeproj/project.pbxproj: Updated for file renames.
2578
2579         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2580         (WebCore::createRsaKeyParamsWithHash):
2581         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
2582         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2583         (WebCore::createRSAKeyParametersWithHash):
2584         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
2585         * crypto/CryptoAlgorithmParameters.h:
2586         (WebCore::CryptoAlgorithmParameters::ENUM_CLASS):
2587         * crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHash.h: Copied from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h.
2588         * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Removed.
2589         Renamed RsaSsaKeyParams to RsaKeyParamsWithHash, because other algorithms (like RSA-OAEP)
2590         are in the same boat. Depending on where the spec goes, we might need to introduce
2591         algorithm specific RSA parameter classes later, but let's reduce copy/pasted code at
2592         least for now.
2593
2594         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Moved to the correct directory.
2595         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Copied from Source/WebCore/crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp.
2596         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign): Factored out Mac specific
2597         code, leaving type casting to cross-platform files.
2598         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify): Ditto.
2599
2600         * crypto/CryptoAlgorithmRegistry.h:
2601         (WebCore::CryptoAlgorithmRegistry::registerAlgorithm):
2602         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
2603         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
2604         Reduce copy/pasting in registration code.
2605
2606         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2607         (WebCore::CryptoAlgorithmAES_CBC::keyAlgorithmMatches): Check key type and algorithm.
2608         (WebCore::CryptoAlgorithmAES_CBC::encrypt): Cross platform type casting code.
2609         Maybe we'll find a way to autogenerate or eliminate it one day.
2610         (WebCore::CryptoAlgorithmAES_CBC::decrypt): Ditto.
2611
2612         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
2613         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2614         (WebCore::CryptoAlgorithmHMAC::keyAlgorithmMatches):
2615         (WebCore::CryptoAlgorithmHMAC::sign):
2616         (WebCore::CryptoAlgorithmHMAC::verify):
2617         * crypto/algorithms/CryptoAlgorithmHMAC.h:
2618         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
2619         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::keyAlgorithmMatches):
2620         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
2621         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
2622         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
2623         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
2624         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
2625         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
2626         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
2627         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
2628         (WebCore::CryptoAlgorithmHMAC::platformSign):
2629         (WebCore::CryptoAlgorithmHMAC::platformVerify):
2630         Same changes for all algorithms that have keys.
2631
2632 2013-11-22  Brendan Long  <b.long@cablelabs.com>
2633
2634         Fire "change" event on TextTrackList when a TextTrack's mode changes
2635         https://bugs.webkit.org/show_bug.cgi?id=124789
2636
2637         Reviewed by Eric Carlson.
2638
2639         Since AudioTrackList and VideoTrackList already have this event, the
2640         interesting bits are in TrackListBase::scheduleChangeEvent(), and we
2641         just need to call it for TextTrackList changes.
2642
2643         Test: media/track/track-change-event.html
2644
2645         * html/HTMLMediaElement.cpp:
2646         (HTMLMediaElement::textTrackModeChanged): Call TrackListBase::scheduleChangeEvent().
2647         * html/track/TextTrackList.idl: Add onchange event listener.
2648
2649 2013-11-22  Brendan Long  <b.long@cablelabs.com>
2650
2651         Add TextTrackList::getTrackById().
2652         https://bugs.webkit.org/show_bug.cgi?id=124785
2653
2654         Reviewed by Eric Carlson.
2655
2656         Test: media/track/track-id.html
2657
2658         * html/track/TextTrackList.cpp: Add getTrackById()
2659         (TextTrackList::getTrackById):
2660         * html/track/TextTrackList.h: Same.
2661         * html/track/TextTrackList.idl: Same.
2662
2663 2013-11-22  Hans Muller  <hmuller@adobe.com>
2664
2665         [CSS Shapes] When the <box> value is set, derive radii from border-radius
2666         https://bugs.webkit.org/show_bug.cgi?id=124228
2667
2668         Reviewed by Dean Jackson.
2669
2670         Add support for BoxShape elliptical corners.
2671
2672         Tests: fast/shapes/shape-outside-floats/shape-outside-rounded-boxes-001.html
2673                fast/shapes/shape-outside-floats/shape-outside-rounded-boxes-002.html
2674
2675         * platform/graphics/FloatRoundedRect.h:
2676         (WebCore::FloatRoundedRect::bottomLeftCorner): Corrected a copy-and-pasteO.
2677         * rendering/shapes/BoxShape.cpp:
2678         (WebCore::BoxShape::getExcludedIntervals): Returned interval now depends on the top and bottom of the line.
2679         * rendering/shapes/Shape.cpp:
2680         (WebCore::Shape::createShape): Rounded rect parameters are now specified with a RoundedRect parameter.
2681         * rendering/shapes/Shape.h:
2682         * rendering/shapes/ShapeInfo.cpp:
2683         (WebCore::::computedShape): Pass style's rounded border to createShape().
2684
2685 2013-11-22  Andres Gomez  <agomez@igalia.com>
2686
2687         Several missing/incorrect guards for LOG_DISABLED=0 against Release build (Mac)
2688         https://bugs.webkit.org/show_bug.cgi?id=78735
2689
2690         Reviewed by Mario Sanchez Prada.
2691
2692         In a "Debug" build the CString.h header comes from another
2693         indirect dependency. Now, we explicitly add this missing include.
2694
2695         * page/CaptionUserPreferencesMediaAF.cpp: Explicitly adding
2696         missing include.
2697
2698 2013-11-22  Robert Sipka  <sipka@inf.u-szeged.hu>
2699
2700         [curl] Fix of SSL certificate chain storage
2701         https://bugs.webkit.org/show_bug.cgi?id=124768
2702
2703         Reviewed by Brent Fulgham.
2704
2705         Change the certificates storage type into ListHashSet
2706         from HashSet to keep the chain order in each case.
2707         This ensures that there is no difference between the stored
2708         and the recieved certificate chain.
2709
2710         * platform/network/curl/SSLHandle.cpp:
2711         (WebCore::allowsAnyHTTPSCertificateHosts):
2712         (WebCore::sslIgnoreHTTPSCertificate):
2713         (WebCore::pemData):
2714         (WebCore::certVerifyCallback):
2715
2716 2013-11-22  Brent Fulgham  <bfulgham@apple.com>
2717
2718         [Win] Avoid deadlock when interacting with some AVFoundationCF content
2719         <rdar://problem/15482977> and https://bugs.webkit.org/show_bug.cgi?id=124752
2720
2721         Prevent deadlock caused by conflict over the "mapLock" mutex. Notification handling in the file,
2722         which modify assets and make other changes, are required to happen on the main thread. This
2723         patch enforces this requirement.
2724
2725         Reviewed by Eric Carlson.
2726
2727         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2728         (WebCore::NotificationCallbackData::NotificationCallbackData): Added
2729         (WebCore::AVFWrapper::processNotification): Moved logic from 'notificationCallback', which was
2730         sometimes happening on a background thread.
2731         (WebCore::AVFWrapper::notificationCallback): Dispatch calls to main thread.
2732
2733 2013-11-22  peavo@outlook.com  <peavo@outlook.com>
2734
2735         [WinCairo] Compile error when ACCELERATED_COMPOSITING is not used.
2736         https://bugs.webkit.org/show_bug.cgi?id=124773
2737
2738         Reviewed by Brent Fulgham.
2739
2740         * rendering/RenderView.cpp:
2741         (WebCore::RenderView::paintBoxDecorations): Added USE(ACCELERATED_COMPOSITING) guard.
2742
2743 2013-11-18  Sergio Villar Senin  <svillar@igalia.com>
2744
2745         [CSS Grid Layout] Improve content-sized track layout
2746         https://bugs.webkit.org/show_bug.cgi?id=124408
2747
2748         Reviewed by Dean Jackson.
2749
2750         Test: fast/css-grid-layout/grid-item-with-percent-min-max-height-dynamic.html
2751
2752         From Blink r156122 & r157633 by <jchaffraix@chromium.org>
2753
2754         Added a couple of optimizations to speed up the layout of content
2755         based tracks. The idea is to narrow down the conditions for
2756         relayouting when the height of a grid area changes. We basically
2757         just need to layout tracks with percentage heights as they're the
2758         only ones that change.
2759
2760         A new performance test is attached to demonstrate the effect of
2761         these optimizations. We get a ~1000% improvement on a i7 M620
2762         going from 14.5 runs/s to 165 runs/s.
2763
2764         * rendering/RenderGrid.cpp:
2765         (WebCore::RenderGrid::logicalContentHeightForChild):
2766         (WebCore::RenderGrid::layoutGridItems):
2767
2768 2013-11-08  Sergio Villar Senin  <svillar@igalia.com>
2769
2770         [CSS Grid Layout] Run the content-sized tracks sizing algorithm only when required
2771         https://bugs.webkit.org/show_bug.cgi?id=124039
2772
2773         Reviewed by Dean Jackson.
2774
2775         The current code runs the content sized track sizing algorithm all
2776         the time, which forces a layout even when the track is not
2777         content-sized. This change improves the situation by applying two
2778         optimizations. In the first one, we bail out the algorithm if we
2779         detect that we don't need to run it. And by the second one we
2780         reduce the amount of recomputations by only iterating over the
2781         content sized tracks instead of all of them. Both changes follow
2782         the ideas introduced in Blink r156028 and r156168 by
2783         <jchaffraix@chromium.org>.
2784
2785         As we changed the way we iterate over children (we use the
2786         GridIterator now) the way they're stored in the RenderGrid changes
2787         too. If a item spans through several "cells" inside the grid, we
2788         will have a reference to it on each of them.
2789
2790         These two changes account for a ~3200% improvement on a i7 M620 in
2791         the test that accompanies this change (15.5 vs 520 run/s).
2792
2793         New perf test: PerformanceTests/Layout/fixed-grid-lots-of-data.html
2794
2795         * rendering/RenderGrid.cpp:
2796         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Keep track
2797         of content sized tracks and only iterate over them.
2798         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2799         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2800         Early return if there are no tracks to pass to the algorithm.
2801         * rendering/RenderGrid.h:
2802         * rendering/style/GridLength.h:
2803         (WebCore::GridLength::isContentSized):
2804         * rendering/style/GridTrackSize.h:
2805         (WebCore::GridTrackSize::isContentSized):
2806
2807 2013-11-22  Manuel Rego Casasnovas  <rego@igalia.com>
2808
2809         [CSS Regions] Move code after early break in RenderRegion::repaintFlowThreadContentRectangle
2810         https://bugs.webkit.org/show_bug.cgi?id=124743
2811
2812         Reviewed by Mihnea Ovidenie.
2813
2814         No new tests, covered by existing tests.
2815
2816         * rendering/RenderRegion.cpp:
2817         (WebCore::RenderRegion::repaintFlowThreadContentRectangle): Variable
2818         flippedFlowThreadPortionRect is not used before the early break, so we
2819         can move it after and save some unneeded operations.
2820
2821 2013-11-22  Manuel Rego Casasnovas  <rego@igalia.com>
2822
2823         [CSS Regions] Use hasOverflowClip() in RenderRegion
2824         https://bugs.webkit.org/show_bug.cgi?id=124746
2825
2826         Reviewed by Mihnea Ovidenie.
2827
2828         Implement the suggested FIXME in RenderRegion using hasOverflowClip().
2829
2830         No new tests, covered by existing tests.
2831
2832         * rendering/RenderRegion.cpp:
2833         (WebCore::RenderRegion::overflowRectForFlowThreadPortion): Use
2834         hasOverflowClip().
2835         (WebCore::RenderRegion::rectFlowPortionForBox): Ditto.
2836
2837 2013-11-21  Frédéric Wang  <fred.wang@free.fr>
2838
2839         Map the dir attribute to the CSS direction property.
2840         https://bugs.webkit.org/show_bug.cgi?id=124572.
2841
2842         Reviewed by Darin Adler.
2843
2844         Test: mathml/presentation/mstyle-css-attributes.html
2845
2846         * mathml/MathMLElement.cpp:
2847         (WebCore::MathMLElement::isPresentationAttribute): reorder attributes
2848         (WebCore::MathMLElement::collectStyleForPresentationAttribute): reorder tags that accept dir
2849         (WebCore::MathMLElement::isMathMLToken): add an inline function to test that a tag corresponds to a MathML Token Element.
2850         * mathml/MathMLElement.h:
2851
2852         Follow-up work to address Darin's comments.
2853
2854 2013-11-21  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
2855
2856         Remove ENABLE_WORKERS
2857         https://bugs.webkit.org/show_bug.cgi?id=105784
2858
2859         Reviewed by Darin Adler.
2860
2861 2013-11-21  Alex Christensen  <achristensen@webkit.org>
2862
2863         [Win] Unreviewed build fix after r159632.
2864
2865         * platform/network/curl/SSLHandle.cpp:
2866         (WebCore::certVerifyCallback):
2867         Fixed template syntax.
2868
2869 2013-11-21  Bear Travis  <betravis@adobe.com>
2870
2871         Web Inspector: [CSS Shapes] Refactor highlighting code to decrease Shapes API surface
2872         https://bugs.webkit.org/show_bug.cgi?id=124737
2873
2874         Reviewed by Timothy Hatcher.
2875
2876         Add a virtual method to Shapes, buildPath, that can be used to build the
2877         path (in the Shape coordinate system) for display in the Inspector. This allows us
2878         to remove methods such as type(), polygon(), and logicalRx/Ry() which exposed the
2879         inner workings of the Shapes classes. Also covers the addition of the BoxShape type.
2880
2881         Refactoring, existing test is inspector-protocol/model/highlight-shape-outside.html.
2882
2883         * inspector/InspectorOverlay.cpp:
2884         (WebCore::appendPathCommandAndPoints): Points need to be translated from shape space
2885         to renderer space using ShapeInfo.
2886         (WebCore::buildObjectForShapeOutside): Add the ShapeOutsideInfo to the path info struct.
2887         * rendering/shapes/BoxShape.cpp:
2888         (WebCore::BoxShape::buildPath): Build the path for a BoxShape.
2889         * rendering/shapes/BoxShape.h:
2890         * rendering/shapes/PolygonShape.cpp:
2891         (WebCore::PolygonShape::buildPath): Build the path for a PolygonShape.
2892         * rendering/shapes/PolygonShape.h:
2893         * rendering/shapes/RasterShape.h:
2894         * rendering/shapes/RectangleShape.cpp:
2895         (WebCore::RectangleShape::buildPath): Build the path for a RectangleShape.
2896         * rendering/shapes/RectangleShape.h:
2897         * rendering/shapes/Shape.h:
2898
2899 2013-11-21  Mark Rowe  <mrowe@apple.com>
2900
2901         <https://webkit.org/b/124702> Stop overriding VALID_ARCHS.
2902
2903         All modern versions of Xcode set it appropriately for our needs.
2904
2905         Reviewed by Alexey Proskuryakov.
2906
2907         * Configurations/Base.xcconfig:
2908
2909 2013-11-21  Gwang Yoon Hwang  <ryumiel@company100.net>
2910
2911         [GTK] Unreviewed buildfix after r159614 and r159656.
2912
2913         * bindings/gobject/WebKitDOMCustom.cpp: Add missing header
2914
2915 2013-11-21  Laszlo Vidacs  <lac@inf.u-szeged.hu>
2916
2917         Fix WinCairo unreachable code warnings in SimpleLineLayout.cpp
2918         https://bugs.webkit.org/show_bug.cgi?id=124704
2919
2920         Reviewed by Antti Koivisto.
2921
2922         Fix unreachable code warnings using conditional directives.
2923
2924         * rendering/SimpleLineLayout.cpp:
2925         (WebCore::SimpleLineLayout::canUseFor):
2926
2927 2013-11-21  Mark Rowe  <mrowe@apple.com>
2928
2929         <https://webkit.org/b/124701> Fix an error in a few Xcode configuration setting files.
2930
2931         Reviewed by Alexey Proskuryakov.
2932
2933         * Configurations/Base.xcconfig:
2934
2935 2013-11-21  Mark Rowe  <mrowe@apple.com>
2936
2937         <https://webkit.org/b/124700> Fix some deprecation warnings.
2938
2939         Reviewed by Anders Carlsson.
2940
2941         * platform/mac/HTMLConverter.mm:
2942         (fileWrapperForURL): Move off a deprecated NSFileWrapper method.
2943
2944 2013-11-21  Daniel Bates  <dabates@apple.com>
2945
2946         [iOS] Build fix; export symbol for WebCore::provideDeviceOrientationTo()
2947
2948         Add the symbol __ZN7WebCore26provideDeviceOrientationToEPNS_4PageEPNS_23DeviceOrientationClientE.
2949
2950         * WebCore.exp.in:
2951
2952 2013-11-21  Daniel Bates  <dabates@apple.com>
2953
2954         Add !USE(NETWORK_CFDATA_ARRAY_CALLBACK)-guard
2955         https://bugs.webkit.org/show_bug.cgi?id=124741
2956
2957         Reviewed by Alexey Proskuryakov.
2958
2959         Add !USE(NETWORK_CFDATA_ARRAY_CALLBACK)-guard around code that is unused
2960         when building with feature NETWORK_CFDATA_ARRAY_CALLBACK.
2961
2962         Additionally, add a declaration for allocateSegment() with attribute WARN_UNUSED_RETURN
2963         to have the compiler warn when the return value of this function is unused. Together with
2964         warnings treated as errors this change will prevent a memory leak.
2965
2966         * platform/SharedBuffer.cpp:
2967
2968 2013-11-21  Daniel Bates  <dabates@apple.com>
2969
2970         Remove unused functions from WebCore and WebKit2
2971         https://bugs.webkit.org/show_bug.cgi?id=124739
2972
2973         Reviewed by Alexey Proskuryakov.
2974
2975         * editing/markup.cpp: Remove unused functions isHTMLBlockElement and
2976         ancestorToRetainStructureAndAppearanceWithNoRenderer.
2977         * rendering/InlineElementBox.cpp: Append newline to the end of the file.
2978
2979 2013-11-21  Daniel Bates  <dabates@apple.com>
2980
2981         Only generate isObservable() when IDL specifies GenerateIsReachable
2982         https://bugs.webkit.org/show_bug.cgi?id=124729
2983
2984         Reviewed by Geoffrey Garen.
2985
2986         We should only generate the static inline function isObservable() when the IDL
2987         specifies GenerateIsReachable. Otherwise, this function is unused.
2988
2989         Added a new test IDL TestGenerateIsReachable.idl and expected results to test that
2990         we generate isObservable() when an IDL specifies GenerateIsReachable. Additionally,
2991         rebased existing test results.
2992
2993         * bindings/scripts/CodeGeneratorJS.pm:
2994         (GenerateImplementation):
2995         * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.cpp: Added.
2996         * bindings/scripts/test/CPP/WebDOMTestGenerateIsReachable.h: Added.
2997         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.cpp: Added.
2998         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachable.h: Added.
2999         * bindings/scripts/test/GObject/WebKitDOMTestGenerateIsReachablePrivate.h: Added.
3000         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Removed unused function isObservable().
3001         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
3002         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
3003         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
3004         * bindings/scripts/test/JS/JSTestException.cpp: Ditto.
3005         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added.
3006         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added.
3007         * bindings/scripts/test/JS/JSTestInterface.cpp: Removed unused function isObservable().
3008         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
3009         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
3010         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
3011         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
3012         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
3013         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
3014         * bindings/scripts/test/JS/JSattribute.cpp: Ditto.
3015         * bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
3016         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h: Added.
3017         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: Added.
3018         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h: Added.
3019         * bindings/scripts/test/TestGenerateIsReachable.idl: Added.
3020
3021 2013-11-21  Beth Dakin  <bdakin@apple.com>
3022
3023         Add a new mode to extend the tile cache beyond the page
3024         https://bugs.webkit.org/show_bug.cgi?id=124216
3025
3026         Reviewed by Simon Fraser.
3027
3028         This patch makes it possible to give the tile cache a margin of tiles. If there is 
3029         a margin of tiles, this patch paints those tiles with the background color. Note 
3030         that this patch does not actually give the tile cache a margin at this time.
3031
3032         You opt into a margined tiled cache by called setTileMargins() with number of 
3033         pixels that the margin on that side should be. 
3034         * platform/graphics/TiledBacking.h:
3035         * platform/graphics/ca/mac/TileController.h:
3036         * platform/graphics/ca/mac/TileController.mm:
3037         (WebCore::TileController::TileController):
3038         (WebCore::TileController::tilesWouldChangeForVisibleRect):
3039
3040         TileController::bounds() now computes the bounds INCLUDING the margin.
3041         (WebCore::TileController::bounds):
3042
3043         adjustRectAtTileIndexForMargin() is a new function that is required to get the 
3044         rect size for tiles in the margin right. rectForTileIndex() assumes all tiles 
3045         strive to be the size of m_tileSize, but now margin tiles will be whatever the 
3046         margin sizes were set to.
3047         (WebCore::TileController::adjustRectAtTileIndexForMargin):
3048         (WebCore::TileController::rectForTileIndex):
3049
3050         This is another instance where m_tileSize is not always the right size to use.
3051         (WebCore::TileController::getTileIndexRangeForRect):
3052
3053         The tile coverage rect now might include the margin tiles. Only include them in 
3054         slow-scrolling mode if the current position is within one tile of the edge.
3055         (WebCore::TileController::computeTileCoverageRect):
3056
3057         tileSizeForCoverageRect() does not make sense in a world where the coverage rect 
3058         will include margin. Instead, this patch implements the current strategy more 
3059         explicitly by returning the visibleRect in the slow scrolling case, and in the 
3060         process this patch also re-names tileSizeForCoverageRect() to computeTileSize() 
3061         since it no longer takes a coverageRect.
3062         (WebCore::TileController::computeTileSize):
3063         (WebCore::TileController::revalidateTiles):
3064
3065         New setters and getters for the tile margins on each side.
3066         (WebCore::TileController::setTileMargins):
3067         (WebCore::TileController::hasMargins):
3068         (WebCore::TileController::topMarginHeight):
3069         (WebCore::TileController::bottomMarginHeight):
3070         (WebCore::TileController::leftMarginWidth):
3071         (WebCore::TileController::rightMarginWidth):
3072
3073         New function to add margin onto the composited bounds if there is one.
3074         * rendering/RenderLayerBacking.cpp:
3075         (WebCore::RenderLayerBacking::tiledBackingHasMargin):
3076         (WebCore::RenderLayerBacking::paintContents):
3077         (WebCore::RenderLayerBacking::compositedBoundsIncludingMargin):
3078         * rendering/RenderLayerBacking.h:
3079
3080         Do not set masks to bounds if there is a margin on the root layer.
3081         * rendering/RenderLayerCompositor.cpp:
3082         (WebCore::RenderLayerCompositor::updateBacking):
3083         (WebCore::RenderLayerCompositor::mainFrameBackingIsTiledWithMargin):
3084         * rendering/RenderLayerCompositor.h:
3085
3086         Allow background color to paint into the margin tiles.
3087         * rendering/RenderView.cpp:
3088         (WebCore::RenderView::paintBoxDecorations):
3089
3090 2013-11-21  Alexey Proskuryakov  <ap@apple.com>
3091
3092         Implement WebCrypto wrapKey
3093         https://bugs.webkit.org/show_bug.cgi?id=124738
3094
3095         Reviewed by Anders Carlsson.
3096
3097         Tests: crypto/subtle/aes-cbc-wrap-rsa-non-extractable.html
3098                crypto/subtle/aes-cbc-wrap-rsa.html
3099
3100         * bindings/js/JSSubtleCryptoCustom.cpp:
3101         (WebCore::exportKey): Factored out the actual operation that can be chained with
3102         encryption for wrapKey.
3103         (WebCore::JSSubtleCrypto::exportKey):
3104         (WebCore::JSSubtleCrypto::wrapKey):
3105         (WebCore::JSSubtleCrypto::unwrapKey): Fixed a memory leak in failure code path.
3106
3107         * crypto/SubtleCrypto.idl: Added wrapKey.
3108
3109 2013-11-21  Alexey Proskuryakov  <ap@apple.com>
3110
3111         Implement WebCrypto unwrapKey
3112         https://bugs.webkit.org/show_bug.cgi?id=124725
3113
3114         Reviewed by Anders Carlsson.
3115
3116         Tests: crypto/subtle/aes-cbc-unwrap-failure.html
3117                crypto/subtle/aes-cbc-unwrap-rsa.html
3118
3119         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
3120         * bindings/js/JSCryptoAlgorithmDictionary.h:
3121         Removed calls for wrap/unwrap parameter parsing, these are just the same as encrypt/decrypt.
3122
3123         * bindings/js/JSCryptoOperationData.cpp:
3124         (WebCore::cryptoOperationDataFromJSValue):
3125         * bindings/js/JSCryptoOperationData.h:
3126         * crypto/CryptoKeySerialization.h:
3127         More Vector<char> elimination.
3128
3129         * bindings/js/JSDOMPromise.cpp:
3130         * bindings/js/JSDOMPromise.h:
3131         Removed unneccessary copy constructor and assignment operator, they are no diffdrent
3132         than compiler generated ones.
3133
3134         * bindings/js/JSSubtleCryptoCustom.cpp:
3135         (WebCore::cryptoKeyUsagesFromJSValue): Minor style fixes.
3136         (WebCore::JSSubtleCrypto::encrypt): Ditto.
3137         (WebCore::JSSubtleCrypto::decrypt): Ditto.
3138         (WebCore::JSSubtleCrypto::sign): Ditto.
3139         (WebCore::JSSubtleCrypto::verify): Ditto.
3140         (WebCore::JSSubtleCrypto::generateKey): Ditto.
3141         (WebCore::importKey): Separated actual import operation and the parts that read
3142         arguments from ExecState, and call the promise. Logically, this should be outside
3143         of bindings code even, but JWK makes that quite challenging.
3144         (WebCore::JSSubtleCrypto::importKey): This only does the more mundane arguments
3145         and return parts now.
3146         (WebCore::JSSubtleCrypto::exportKey): Minor style fixes.
3147         (WebCore::JSSubtleCrypto::unwrapKey): Chain decrypt and import.
3148
3149         * crypto/CryptoAlgorithm.cpp:
3150         (WebCore::CryptoAlgorithm::encryptForWrapKey):
3151         (WebCore::CryptoAlgorithm::decryptForUnwrapKey):
3152         * crypto/CryptoAlgorithm.h:
3153         There are algorithms that expose wrap/unwrap, but not encrypt/decrypt. These will
3154         override these new functions, and leave encrypt/decrypt to raise NOT_SUPPORTED_ERR.
3155
3156         * crypto/SubtleCrypto.idl: Added unwrapKey.
3157
3158 2013-11-21  Robert Sipka  <sipka@inf.u-szeged.hu>
3159
3160         [curl]Improve ssl certificate storage and check
3161         https://bugs.webkit.org/show_bug.cgi?id=124569
3162
3163         Reviewed by Brent Fulgham.
3164
3165         Storage and check the whole certificate chain, not just the root certificate.
3166
3167         * platform/network/curl/SSLHandle.cpp:
3168         (WebCore::allowsAnyHTTPSCertificateHosts):
3169         (WebCore::sslIgnoreHTTPSCertificate):
3170         (WebCore::pemData):
3171         (WebCore::certVerifyCallback):
3172
3173 2013-11-21  Mihai Maerean  <mmaerean@adobe.com>
3174
3175         Fix hover area for divs with css transforms
3176         https://bugs.webkit.org/show_bug.cgi?id=124647
3177
3178         Reviewed by Allan Sandfeld Jensen.
3179
3180         Non transformed layers are now being hit last, not through or in-between transformed layers.
3181         The paint order says that the divs creating stacking contexts (including transforms) are painted after the
3182         other siblings so they should be hit tested in the reverse order. Also, a rotated div in a non-rotated parent
3183         should be hit in its entire area, not hit its parent's background, even if the z-coordinate is negative where
3184         the mouse is located.
3185
3186         Test: transforms/3d/hit-testing/hover-rotated-negative-z.html
3187
3188         * rendering/RenderLayer.cpp:
3189         (WebCore::computeZOffset):
3190
3191 2013-11-21  Andres Gomez  <agomez@igalia.com>
3192
3193         [GTK] Release compilation fails when defining "LOG_DISABLED=0"
3194         https://bugs.webkit.org/show_bug.cgi?id=124661
3195
3196         Reviewed by Mario Sanchez Prada.
3197
3198         In a "Debug" build the CString.h header comes from another
3199         indirect dependency. Now, we explicitly add this missing include.
3200
3201         * html/HTMLTrackElement.cpp: Explicitly adding missing include.
3202
3203 2013-11-21  Ryosuke Niwa  <rniwa@webkit.org>
3204
3205         Fix Range.insertNode when the inserted node is in the same container as the Range
3206         https://bugs.webkit.org/show_bug.cgi?id=123957
3207
3208         Reviewed by Antti Koivisto.
3209
3210         Inspired by https://chromium.googlesource.com/chromium/blink/+/fb6ca1f488703e8d4f20ce6449cc8ea210be6edb
3211
3212         When a node from the same container is inserted, we can't simply adjust m_end with the offset.
3213         Compute m_start and m_end from the inserted nodes instead.
3214
3215         Also, don't adjust m_start and m_end to nodes outside of the document if the inserted nodes had been
3216         removed by mutation events.
3217
3218         Test: fast/dom/Range/range-insertNode-same-container.html
3219
3220         * dom/Range.cpp:
3221         (WebCore::Range::insertNode):
3222
3223 2013-11-21  Ryosuke Niwa  <rniwa@webkit.org>
3224
3225         nextBoundary and previousBoundary are very slow when there is a password field
3226         https://bugs.webkit.org/show_bug.cgi?id=123973
3227
3228         Reviewed by Antti Koivisto.
3229
3230         Merge https://chromium.googlesource.com/chromium/blink/+/57366eec5e3edea54062d4e74c0e047f8681dbad
3231
3232         When iterating through DOM nodes nextBoundary and previousBoundary convert the contents of nodes using
3233         text security to a sequence of 'x' characters. The SimplifiedBackwardsTextIterator and TextIterator
3234         may iterate past node boundaries. Before this patch, the transformation was done looking at the starting
3235         node rather than the current node. In some situations, this replaced all boundaries with 'x' and caused
3236         the text iterator to continue iterating and transforming until the extent of the document.
3237
3238         Test: editing/deleting/password-delete-performance.html
3239
3240         * editing/TextIterator.h:
3241         (WebCore::SimplifiedBackwardsTextIterator::node):
3242         * editing/VisibleUnits.cpp:
3243         (WebCore::previousBoundary):
3244         (WebCore::nextBoundary):
3245
3246 2013-11-21  Ryosuke Niwa  <rniwa@webkit.org>
3247
3248         HTML parser should not associate elements inside templates with forms
3249         https://bugs.webkit.org/show_bug.cgi?id=117779
3250
3251         Reviewed by Antti Koivisto.
3252
3253         Merge https://chromium.googlesource.com/chromium/blink/+/45aadf7ee7ee010327eb692066cf013315ef3ed7
3254
3255         When parsing <form><template><input>, the previous behavior was to associate the <input> with the <form>,
3256         even though they're not in the same tree (or even the same document).
3257
3258         This patch changes that by checking, prior to creating a form control element, whether the element to be
3259         created lives in a document with a browsing context.
3260
3261         We don't update m_form as needed to faithfully match the HTML5 specification's form element pointer
3262         http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#form-element-pointer
3263         and its algorithm for creating and inserting nodes:
3264         http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#creating-and-inserting-nodes
3265
3266         While this leaves isindex's reference to form element pointer stale:
3267         http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#isindex
3268         The HTML5 specification matches the behaviors of Chrome and Firefox so we leave it as is.
3269
3270         Test: fast/dom/HTMLTemplateElement/no-form-association.html
3271
3272         * html/parser/HTMLConstructionSite.cpp:
3273         (WebCore::HTMLConstructionSite::createHTMLElement):
3274
3275 2013-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3276
3277         [GTK] Cannot scroll in option menu when it larger than the screen
3278         https://bugs.webkit.org/show_bug.cgi?id=124671
3279
3280         Reviewed by Martin Robinson.
3281
3282         The problem is that the popup menu is not resized to fit in the
3283         screen, so it doesn't scroll and some of the items are offscreen
3284         so they can't be selected either. GTK+ automatically resizes the
3285         popup menus to fit in the work area, but only when the menu is
3286         already positioned.
3287
3288         * platform/gtk/GtkPopupMenu.cpp:
3289         (WebCore::GtkPopupMenu::popUp): Schedule a resize of the popup
3290         menu right after showing it once it has a position.
3291
3292 2013-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3293
3294         [GTK] Mark all deprecated symbols in GObject DOM bindings
3295         https://bugs.webkit.org/show_bug.cgi?id=124406
3296
3297         Reviewed by Gustavo Noronha Silva.
3298
3299         Move deprecated API from WebKitDOMCustom to a new file
3300         WebKitDOMDeprecated leaving in WebKitDOMCustom only the
3301         non-deprecated API that is not autogenerated. Also added the
3302         deprecation decorations and tags in the documentation.
3303
3304         * bindings/gobject/GNUmakefile.am:
3305         * bindings/gobject/WebKitDOMCustom.cpp:
3306         * bindings/gobject/WebKitDOMCustom.h:
3307         * bindings/gobject/WebKitDOMCustom.symbols:
3308         * bindings/gobject/WebKitDOMDeprecated.cpp: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.cpp.
3309         (webkit_dom_blob_webkit_slice):
3310         (webkit_dom_html_element_get_id):
3311         (webkit_dom_html_element_set_id):
3312         (webkit_dom_html_element_get_class_name):
3313         (webkit_dom_html_element_set_class_name):
3314         (webkit_dom_html_element_get_class_list):
3315         (webkit_dom_html_form_element_dispatch_form_change):
3316         (webkit_dom_html_form_element_dispatch_form_input):
3317         (webkit_dom_webkit_named_flow_get_overflow):
3318         (webkit_dom_element_get_webkit_region_overflow):
3319         (webkit_dom_webkit_named_flow_get_content_nodes):
3320         (webkit_dom_webkit_named_flow_get_regions_by_content_node):
3321         (webkit_dom_bar_info_get_property):
3322         (webkit_dom_bar_info_class_init):
3323         (webkit_dom_bar_info_init):
3324         (webkit_dom_bar_info_get_visible):
3325         (webkit_dom_console_get_memory):
3326         (webkit_dom_css_style_declaration_get_property_css_value):
3327         (webkit_dom_document_get_webkit_hidden):
3328         (webkit_dom_document_get_webkit_visibility_state):
3329         (webkit_dom_html_document_open):
3330         (webkit_dom_html_element_set_item_id):
3331         (webkit_dom_html_element_get_item_id):
3332         (webkit_dom_html_element_get_item_ref):
3333         (webkit_dom_html_element_get_item_prop):
3334         (webkit_dom_html_element_set_item_scope):
3335         (webkit_dom_html_element_get_item_scope):
3336         (webkit_dom_html_element_get_item_type):
3337         (webkit_dom_html_style_element_set_scoped):
3338         (webkit_dom_html_style_element_get_scoped):
3339         (webkit_dom_html_properties_collection_get_property):
3340         (webkit_dom_html_properties_collection_class_init):
3341         (webkit_dom_html_properties_collection_init):
3342         (webkit_dom_html_properties_collection_item):
3343         (webkit_dom_html_properties_collection_named_item):
3344         (webkit_dom_html_properties_collection_get_length):
3345         (webkit_dom_html_properties_collection_get_names):
3346         (webkit_dom_node_get_attributes):
3347         (webkit_dom_node_has_attributes):
3348         (webkit_dom_memory_info_get_property):
3349         (webkit_dom_memory_info_class_init):
3350         (webkit_dom_memory_info_init):
3351         (webkit_dom_memory_info_get_total_js_heap_size):
3352         (webkit_dom_memory_info_get_used_js_heap_size):
3353         (webkit_dom_memory_info_get_js_heap_size_limit):
3354         (webkit_dom_micro_data_item_value_class_init):
3355         (webkit_dom_micro_data_item_value_init):
3356         (webkit_dom_performance_get_memory):
3357         (webkit_dom_property_node_list_get_property):
3358         (webkit_dom_property_node_list_class_init):
3359         (webkit_dom_property_node_list_init):
3360         (webkit_dom_property_node_list_item):
3361         (webkit_dom_property_node_list_get_length):
3362         (webkit_dom_html_media_element_get_start_time):
3363         (webkit_dom_html_media_element_get_initial_time):
3364         (webkit_dom_html_head_element_get_profile):
3365         (webkit_dom_html_head_element_set_profile):
3366         (webkit_dom_processing_instruction_get_data):
3367         (webkit_dom_processing_instruction_set_data):
3368         * bindings/gobject/WebKitDOMDeprecated.h: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.h.
3369         * bindings/gobject/WebKitDOMDeprecated.symbols: Copied from Source/WebCore/bindings/gobject/WebKitDOMCustom.symbols.
3370         * bindings/scripts/CodeGeneratorGObject.pm:
3371         (GenerateFunction): Do not include deprecation guards in the cpp file.
3372         * bindings/scripts/gobject-generate-headers.pl: Do not create
3373         fordward declarations for non-existent classes like Custom and
3374         Deprecated.
3375         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
3376         (webkit_dom_test_event_target_dispatch_event):
3377
3378 2013-11-20  Jae Hyun Park  <jae.park@company100.net>
3379
3380         [CoordinatedGraphics] Use std::unique_ptrs rather than OwnPtrs
3381         https://bugs.webkit.org/show_bug.cgi?id=124692
3382
3383         Reviewed by Noam Rosenthal.
3384
3385         No new tests, covered by existing ones.
3386
3387         * platform/graphics/TiledBackingStore.cpp:
3388         (WebCore::TiledBackingStore::TiledBackingStore):
3389         * platform/graphics/TiledBackingStore.h:
3390         * platform/graphics/TiledBackingStoreBackend.h:
3391         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3392         (WebCore::CoordinatedGraphicsLayer::createBackingStore):
3393         * platform/graphics/texmap/coordinated/CoordinatedTile.h:
3394
3395 2013-11-20  Brady Eidson  <beidson@apple.com>
3396
3397         Add more infrastructure for ServerConnection communication between Web and Database processes
3398         https://bugs.webkit.org/show_bug.cgi?id=124693
3399
3400         Reviewed by Anders Carlsson.
3401
3402         * WebCore.exp.in:
3403
3404 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
3405
3406         Hoist <template> to head when found between </head> and <body> for consistency with <script>
3407         https://bugs.webkit.org/show_bug.cgi?id=123949
3408
3409         Reviewed by Antti Koivisto.
3410
3411         Merge https://chromium.googlesource.com/chromium/blink/+/835fb468fd211054a920fb7612a6dc5043662495
3412
3413         Move template elements between head and body elements into the head to be consistent with script elements.
3414         The HTML5 specification was changed in http://html5.org/tools/web-apps-tracker?from=8217&to=8218.
3415
3416         Inline comments below are cited from https://www.w3.org/Bugs/Public/show_bug.cgi?id=23002
3417         and https://codereview.chromium.org/25900003 for clarity.
3418
3419         * html/parser/HTMLTreeBuilder.cpp:
3420         (WebCore::HTMLTreeBuilder::processStartTag): Add the template element to the list of elements to be hoisted into
3421         the head element.
3422         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
3423
3424         Replace the assertion that isParsingFragment is true when item->node() == m_tree.openElements()->rootNode() since,
3425         with this change, we can now invoke resetInsertionMode when parsing a normal document (not fragment) and there is
3426         only the html element on the stack of open elements.
3427
3428         For the second change, consider: <head></head><template>
3429
3430         This example breaks in the old HTML parser because the template element is handled by "after head" state which
3431         pushes the head element back on, processes the template element for "in head", then pops the head element off.
3432         EOF is reached, which processes a fake close tag for the template element, which pops the template element off
3433         and resets the insertion mode appropriately
3434
3435         The problem here is that "reset the insertion mode" is going to inspect the bottom-most element on the stack which
3436         is now the html element and it will set the mode to "before head". Nothing good happens after this.
3437
3438         We fix this problem by having the reset algorithm check if the head element pointer is set, and if so, go to after
3439         head instead of before head.
3440
3441 2013-11-20  Radu Stavila  <stavila@adobe.com>
3442
3443         [CSS Regions] Implement visual overflow for first & last regions
3444         https://bugs.webkit.org/show_bug.cgi?id=118665
3445
3446         In order to properly propagate the visual overflow of elements flowed inside regions, 
3447         the responsiblity of painting and hit-testing content inside flow threads has been
3448         moved to the flow thread layer's level.
3449         Each region keeps the associated overflow with each box in the RenderBoxRegionInfo
3450         structure, including one for the flow thread itself. This data is used during
3451         painting and hit-testing.
3452
3453         Reviewed by David Hyatt.
3454
3455         Tests: fast/regions/overflow-first-and-last-regions-in-container-hidden.html
3456                fast/regions/overflow-first-and-last-regions.html
3457                fast/regions/overflow-nested-regions.html
3458                fast/regions/overflow-region-float.html
3459                fast/regions/overflow-region-inline.html
3460                fast/regions/overflow-region-transform.html
3461
3462         * rendering/InlineFlowBox.cpp:
3463         (WebCore::InlineFlowBox::setLayoutOverflow):
3464         (WebCore::InlineFlowBox::setVisualOverflow):
3465         * rendering/InlineFlowBox.h:
3466         * rendering/RenderBlock.cpp:
3467         (WebCore::RenderBlock::addOverflowFromChildren):
3468         (WebCore::RenderBlock::paint):
3469         (WebCore::RenderBlock::paintObject):
3470         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
3471         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
3472         * rendering/RenderBlockFlow.cpp:
3473         (WebCore::RenderBlockFlow::hasNextPage):
3474         (WebCore::RenderBlockFlow::relayoutForPagination):
3475         * rendering/RenderBlockLineLayout.cpp:
3476         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
3477         * rendering/RenderBox.cpp:
3478         (WebCore::RenderBox::borderBoxRectInRegion):
3479         (WebCore::RenderBox::computeRectForRepaint):
3480         (WebCore::RenderBox::addLayoutOverflow):
3481         (WebCore::RenderBox::addVisualOverflow):
3482         (WebCore::RenderBox::isUnsplittableForPagination):
3483         (WebCore::RenderBox::overflowRectForPaintRejection):
3484         * rendering/RenderBox.h:
3485         (WebCore::RenderBox::canHaveOutsideRegionRange):
3486         * rendering/RenderBoxModelObject.cpp:
3487         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
3488         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3489         * rendering/RenderBoxModelObject.h:
3490         * rendering/RenderBoxRegionInfo.h:
3491         (WebCore::RenderBoxRegionInfo::createOverflow):
3492         * rendering/RenderFlowThread.cpp:
3493         (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
3494         (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
3495         (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
3496         (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
3497         (WebCore::RenderFlowThread::flipForWritingModeLocalCoordinates):
3498         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
3499         (WebCore::RenderFlowThread::addRegionsVisualOverflow):
3500         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
3501         * rendering/RenderFlowThread.h:
3502         * rendering/RenderLayer.cpp:
3503         (WebCore::RenderLayer::updateLayerPositions):
3504         (WebCore::expandClipRectForRegionAndReflection):
3505         (WebCore::expandClipRectForDescendantsAndReflection):
3506         (WebCore::RenderLayer::paintLayer):
3507         (WebCore::RenderLayer::paintLayerContents):
3508         (WebCore::RenderLayer::updatePaintingInfoForFragments):
3509         (WebCore::RenderLayer::paintForegroundForFragments):
3510         (WebCore::RenderLayer::hitTest):
3511         (WebCore::RenderLayer::hitTestLayer):
3512         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
3513         (WebCore::RenderLayer::calculateClipRects):
3514         (WebCore::RenderLayer::parentClipRects):
3515         (WebCore::RenderLayer::calculateRects):
3516         (WebCore::RenderLayer::intersectsDamageRect):
3517         (WebCore::RenderLayer::updateDescendantsLayerListsIfNeeded):
3518         (WebCore::RenderLayer::repaintIncludingDescendants):
3519         (WebCore::RenderLayer::paintNamedFlowThreadInsideRegion):
3520         (WebCore::RenderLayer::paintFlowThreadIfRegion):
3521         (WebCore::RenderLayer::hitTestFlowThreadIfRegion):
3522         * rendering/RenderLayer.h:
3523         (WebCore::ClipRect::inflateX):
3524         (WebCore::ClipRect::inflateY):
3525         (WebCore::ClipRect::inflate):
3526         * rendering/RenderLayerCompositor.cpp:
3527         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3528         * rendering/RenderListItem.cpp:
3529         (WebCore::RenderListItem::addOverflowFromChildren):
3530         * rendering/RenderMultiColumnSet.cpp:
3531         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
3532         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
3533         * rendering/RenderMultiColumnSet.h:
3534         * rendering/RenderNamedFlowFragment.cpp:
3535         (WebCore::RenderNamedFlowFragment::createStyle):
3536         (WebCore::RenderNamedFlowFragment::namedFlowThread):
3537         * rendering/RenderNamedFlowFragment.h:
3538         * rendering/RenderOverflow.h:
3539         * rendering/RenderRegion.cpp:
3540         (WebCore::RenderRegion::flowThreadPortionOverflowRect):
3541         (WebCore::RenderRegion::flowThreadPortionLocation):
3542         (WebCore::RenderRegion::regionContainerLayer):
3543         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
3544         (WebCore::RenderRegion::computeOverflowFromFlowThread):
3545         (WebCore::RenderRegion::repaintFlowThreadContent):
3546         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
3547         (WebCore::RenderRegion::insertedIntoTree):
3548         (WebCore::RenderRegion::ensureOverflowForBox):
3549         (WebCore::RenderRegion::rectFlowPortionForBox):
3550         (WebCore::RenderRegion::addLayoutOverflowForBox):
3551         (WebCore::RenderRegion::addVisualOverflowForBox):
3552         (WebCore::RenderRegion::layoutOverflowRectForBox):
3553         (WebCore::RenderRegion::visualOverflowRectForBox):
3554         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
3555         * rendering/RenderRegion.h:
3556         * rendering/RenderReplaced.cpp:
3557         (WebCore::RenderReplaced::shouldPaint):
3558         * rendering/RootInlineBox.cpp:
3559         (WebCore::RootInlineBox::paint):
3560
3561 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
3562
3563         [HTML parser] reset insertion mode appropriate must check for "in select in table" mode
3564         https://bugs.webkit.org/show_bug.cgi?id=123850
3565
3566         Reviewed by Antti Koivisto.
3567
3568         Merge https://chromium.googlesource.com/chromium/blink/+/2cb7523df57dfb48111f6aa16b7138cd54024ba7
3569
3570         The HTML specification has been updated to detect encountering a template element inside of a select element,
3571         which in turn is inside of a table element. In this case, the select element will cause the parser to be in
3572         "InSelectInTable" mode. Thus when the template element closes, it should return to that mode.
3573
3574         The fix here is that resetInsertionModeAppropriately must continue looking up the stack if the first node is
3575         select element to see whether the select element is inside of a table element.
3576
3577         See also: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#reset-the-insertion-mode-appropriately
3578
3579         Test: html5lib/resources/template.dat
3580
3581         * html/parser/HTMLTreeBuilder.cpp:
3582         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
3583
3584 2013-11-20  Mark Lam  <mark.lam@apple.com>
3585
3586         Build fix for last commit.
3587         https://bugs.webkit.org/show_bug.cgi?id=124634.
3588
3589         Not reviewed.
3590
3591         No new tests.
3592
3593         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
3594
3595 2013-11-20  Mark Lam  <mark.lam@apple.com>
3596
3597         Introducing VMEntryScope to update the VM stack limit.
3598         https://bugs.webkit.org/show_bug.cgi?id=124634.
3599
3600         Reviewed by Geoffrey Garen.
3601
3602         No new tests.
3603
3604         Renamed dynamicGlobalObject() to vmEntryGlobalObject().
3605         Replaced uses of DynamicGlobalObjectScope with VMEntryScope.
3606
3607         * ForwardingHeaders/runtime/VMEntryScope.h: Added.
3608         * WebCore.vcxproj/WebCore.vcxproj:
3609         * WebCore.vcxproj/WebCore.vcxproj.filters:
3610         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
3611         (WebCore::JSCryptoAlgorithmBuilder::add):
3612         * bindings/js/JSCustomXPathNSResolver.cpp:
3613         (WebCore::JSCustomXPathNSResolver::create):
3614         * bindings/js/JSDOMBinding.cpp:
3615         (WebCore::firstDOMWindow):
3616         * bindings/js/JSErrorHandler.cpp:
3617         (WebCore::JSErrorHandler::handleEvent):
3618         * bindings/js/JSEventListener.cpp:
3619         (WebCore::JSEventListener::handleEvent):
3620         * bindings/js/JavaScriptCallFrame.h:
3621         (WebCore::JavaScriptCallFrame::vmEntryGlobalObject):
3622         * bindings/js/PageScriptDebugServer.cpp:
3623         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
3624         * bindings/js/ScriptDebugServer.cpp:
3625         (WebCore::ScriptDebugServer::evaluateBreakpointAction):
3626         (WebCore::ScriptDebugServer::handlePause):
3627         * bindings/js/WorkerScriptDebugServer.cpp:
3628         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
3629         * bindings/objc/WebScriptObject.mm:
3630         (WebCore::addExceptionToConsole):
3631         * bridge/c/c_utility.cpp:
3632         (JSC::Bindings::convertValueToNPVariant):
3633         * bridge/objc/objc_instance.mm:
3634         (ObjcInstance::moveGlobalExceptionToExecState):
3635         * bridge/objc/objc_runtime.mm:
3636         (JSC::Bindings::convertValueToObjcObject):
3637         * bridge/objc/objc_utility.mm:
3638         (JSC::Bindings::convertValueToObjcValue):
3639
3640 2013-11-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3641
3642         Generate toHTMLFooElement() to clean up static_cast<>
3643         https://bugs.webkit.org/show_bug.cgi?id=124571
3644
3645         Reviewed by Ryosuke Niwa.
3646
3647         Though there are a lot of clean up commits before, there are still
3648         use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
3649         toHTMLDetails|Meta|Summary|TableCaptionElement().
3650
3651         Additionally, other static_cast<> are removed as well.
3652
3653         No new tests, no behavior changes.
3654
3655         * html/HTMLDetailsElement.h:
3656         * html/HTMLMediaElement.cpp:
3657         (HTMLMediaElement::selectNextSourceChild):
3658         * html/HTMLMetaElement.h:
3659         * html/HTMLObjectElement.cpp:
3660         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
3661         * html/HTMLOptionElement.cpp:
3662         (WebCore::HTMLOptionElement::isDisabledFormControl):
3663         * html/HTMLPlugInImageElement.cpp:
3664         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
3665         * html/HTMLSummaryElement.cpp:
3666         (WebCore::HTMLSummaryElement::detailsElement):
3667         * html/HTMLSummaryElement.h:
3668         * html/HTMLTableCaptionElement.h:
3669         * html/HTMLTableElement.cpp:
3670         (WebCore::HTMLTableElement::caption):
3671         * html/HTMLTagNames.in:
3672         * html/MediaDocument.cpp:
3673         (WebCore::MediaDocumentParser::createDocumentStructure):
3674         * html/shadow/DetailsMarkerControl.cpp:
3675         (WebCore::DetailsMarkerControl::summaryElement):
3676         * loader/FrameLoader.cpp:
3677         (WebCore::FrameLoader::handleFallbackContent):
3678         * loader/ImageLoader.cpp:
3679         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
3680         * page/DragController.cpp:
3681         (WebCore::DragController::canProcessDrag):
3682         * page/Frame.cpp:
3683         (WebCore::Frame::searchForLabelsBeforeElement):
3684         * page/SpatialNavigation.cpp:
3685         (WebCore::frameOwnerElement):
3686
3687 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
3688
3689         Clear TemplateContentDocumentFragment::m_host when HTMLTemplateElement is destroyed
3690         https://bugs.webkit.org/show_bug.cgi?id=122806
3691
3692         Reviewed by Antti Koivisto.
3693
3694         Merge https://chromium.googlesource.com/chromium/blink/+/858ed5f6341de9d900768c1f4668fcfce870c52e
3695
3696         The document fragment of a template element outlives the element itself.
3697         Clear the host property on the document fragment when that happens.
3698
3699         Test: fast/dom/HTMLTemplateElement/content-outlives-template-crash.html
3700
3701         * dom/TemplateContentDocumentFragment.h:
3702         * html/HTMLTemplateElement.cpp:
3703         (WebCore::HTMLTemplateElement::~HTMLTemplateElement):
3704         * html/HTMLTemplateElement.h:
3705
3706 2013-11-20  Chris Fleizach  <cfleizach@apple.com>
3707
3708         AX: Implement CSS -webkit-alt property (text alternative for generated content pseudo-elements ::before and ::after)
3709         https://bugs.webkit.org/show_bug.cgi?id=120188
3710
3711         Reviewed by Dean Jackson.
3712
3713         Add a -webkit-alt CSS property that can be used to label Image content or Text content for accessibility clients.
3714
3715         To accomplish this, it sets the string in the RenderStyle. Then when the ContentData creates an anonymous renderer,
3716         it sets that string on the TextFragment or RenderImage, which can be queried by accessibility code.
3717
3718         Test: platform/mac/accessibility/webkit-alt-for-css-content.html
3719
3720         * accessibility/AccessibilityNodeObject.cpp:
3721         (WebCore::AccessibilityNodeObject::alternativeText):
3722         * accessibility/AccessibilityRenderObject.cpp:
3723         (WebCore::AccessibilityRenderObject::textUnderElement):
3724         (WebCore::objectInclusionFromAltText):
3725         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3726         * css/CSSComputedStyleDeclaration.cpp:
3727         (WebCore::altTextToCSSValue):
3728         (WebCore::ComputedStyleExtractor::propertyValue):
3729         * css/CSSParser.cpp:
3730         (WebCore::CSSParser::parseValue):
3731         (WebCore::CSSParser::parseAlt):
3732         * css/CSSParser.h:
3733         * css/CSSPropertyNames.in:
3734         * css/StyleResolver.cpp:
3735         (WebCore::StyleResolver::applyProperty):
3736         * rendering/RenderImage.h:
3737         (WebCore::RenderImage::altText):
3738         (WebCore::RenderImage::setAltText):
3739         * rendering/RenderTextFragment.h:
3740         * rendering/style/ContentData.cpp:
3741         (WebCore::ImageContentData::createRenderer):
3742         (WebCore::TextContentData::createRenderer):
3743         * rendering/style/ContentData.h:
3744         (WebCore::ContentData::setAltText):
3745         (WebCore::ContentData::altText):
3746         * rendering/style/RenderStyle.cpp:
3747         (WebCore::RenderStyle::setContent):
3748         (WebCore::RenderStyle::setContentAltText):
3749         (WebCore::RenderStyle::contentAltText):
3750         * rendering/style/RenderStyle.h:
3751         * rendering/style/StyleRareNonInheritedData.h:
3752
3753 2013-11-20  Roger Fong  <roger_fong@apple.com>
3754
3755         Use compile flag SH_UNFOLD_SHORT_CIRCUIT when compiling shaders.
3756         https://bugs.webkit.org/show_bug.cgi?id=124684.
3757
3758         Reviewed by Brent Fulgham.
3759
3760         Existing test webgl/1.0.2/conformance/glsl/misc/shader-with-short-circuiting-operators.html
3761
3762         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3763         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
3764
3765 2013-11-20  Robert Sipka  <sipka@inf.u-szeged.hu>
3766
3767         [curl] Improve detecting and handling of SSL related errors
3768         https://bugs.webkit.org/show_bug.cgi?id=119436
3769
3770         Reviewed by Brent Fulgham.
3771
3772         Set the exact SSL verification error on CURL
3773         and store the enabled domain with certificate.
3774
3775         * WebCore.vcxproj/WebCore.vcxproj:
3776         * WebCore.vcxproj/WebCore.vcxproj.filters:
3777         * platform/network/ResourceHandle.h:
3778         * platform/network/ResourceHandleInternal.h:
3779         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3780         * platform/network/curl/ResourceError.h:
3781         (WebCore::ResourceError::ResourceError):
3782         (WebCore::ResourceError::sslErrors):
3783         (WebCore::ResourceError::setSSLErrors):
3784         * platform/network/curl/ResourceHandleCurl.cpp:
3785         (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
3786         * platform/network/curl/ResourceHandleManager.cpp:
3787         (WebCore::ResourceHandleManager::downloadTimerCallback):
3788         (WebCore::ResourceHandleManager::initializeHandle):
3789         * platform/network/curl/SSLHandle.cpp: Added.
3790         (WebCore::allowsAnyHTTPSCertificateHosts):
3791         (WebCore::sslIgnoreHTTPSCertificate):
3792         (WebCore::sslCertificateFlag):
3793         (WebCore::pemData):
3794         (WebCore::certVerifyCallback):
3795         (WebCore::sslctxfun):
3796         (WebCore::setSSLVerifyOptions):
3797         * platform/network/curl/SSLHandle.h: Added.
3798
3799 2013-11-20  Bem Jones-Bey  <bjonesbe@adobe.com>
3800
3801         [css shapes] Parse new circle shape syntax
3802         https://bugs.webkit.org/show_bug.cgi?id=124618
3803
3804         Reviewed by Antti Koivisto.
3805
3806         Implement parsing of the new cicle shape syntax. The implementation of
3807         the old syntax has been move aside as deprecated, and will be removed
3808         once the new syntax is stable.
3809
3810         Updated existing parsing tests to cover this.
3811
3812         * css/BasicShapeFunctions.cpp:
3813         (WebCore::valueForCenterCoordinate): Create a CSSPrimitiveValue from a
3814             BasicShapeCenterCoordinate.
3815         (WebCore::valueForBasicShape): Convert new basic shape and rename old
3816             one.
3817         (WebCore::convertToCenterCoordinate): Create a
3818             BasicShapeCenterCoordinate from a CSSPrimitiveValue.
3819         (WebCore::basicShapeForValue): Convert new shape value and rename old
3820             one.
3821         * css/CSSBasicShapes.cpp:
3822         (WebCore::buildCircleString): Build a new circle string.
3823         (WebCore::CSSBasicShapeCircle::cssText): Serialize the new circle
3824             shape.
3825         (WebCore::CSSBasicShapeCircle::equals): Compare new circle shapes.
3826         (WebCore::CSSBasicShapeCircle::serializeResolvingVariables):
3827         * css/CSSBasicShapes.h:
3828         (WebCore::CSSBasicShapeCircle::CSSBasicShapeCircle): Add class for new
3829             circle shape.
3830         (WebCore::CSSDeprecatedBasicShapeCircle::create): Renamed to move out
3831             of the way of the new circle implementation.
3832         (WebCore::CSSDeprecatedBasicShapeCircle::centerX): Ditto.
3833         (WebCore::CSSDeprecatedBasicShapeCircle::centerY): Ditto.
3834         (WebCore::CSSDeprecatedBasicShapeCircle::radius): Ditto.
3835         (WebCore::CSSDeprecatedBasicShapeCircle::setCenterX): Ditto.
3836         (WebCore::CSSDeprecatedBasicShapeCircle::setCenterY): Ditto.
3837         (WebCore::CSSDeprecatedBasicShapeCircle::setRadius): Ditto.
3838         (WebCore::CSSDeprecatedBasicShapeCircle::CSSDeprecatedBasicShapeCircle): Ditto.
3839         * css/CSSParser.cpp:
3840         (WebCore::CSSParser::parseShapeRadius): Parse the radius for the new
3841             circle syntax. Will also be used by the new ellipse syntax.
3842         (WebCore::CSSParser::parseBasicShapeCircle): Parse the new circle
3843             syntax.
3844         (WebCore::CSSParser::parseDeprecatedBasicShapeCircle): Rename to make
3845             way for the new implementation.
3846         (WebCore::isDeprecatedBasicShape): Check if we have a new circle or an
3847             old circle.
3848         (WebCore::CSSParser::parseBasicShape): Update to parse the new circle
3849             syntax.
3850         * css/CSSParser.h:
3851         * css/CSSValueKeywords.in: Add support for the new circle keywords.
3852         * rendering/shapes/Shape.cpp:
3853         (WebCore::Shape::createShape): 
3854         * rendering/style/BasicShapes.cpp: Deprecate old circle and add stub
3855             for layout code.
3856         (WebCore::DeprecatedBasicShapeCircle::path): Rename to make way for
3857             the new implementation.
3858         (WebCore::DeprecatedBasicShapeCircle::blend): Rename to make way for
3859             the new implementation.
3860         (WebCore::BasicShapeCircle::path): Create path for new circle shape.
3861         (WebCore::BasicShapeCircle::blend): Interpolate the new circle shape.
3862         * rendering/style/BasicShapes.h:
3863         (WebCore::BasicShapeCenterCoordinate::BasicShapeCenterCoordinate):
3864             Represent an x or y coordinate for the center of a new circle,
3865             since it can be either a keyword along with an offset that cannot
3866             be resolved until layout time or an ordinary Length. This will
3867             also be used by the new ellipse implementation.
3868         (WebCore::BasicShapeCenterCoordinate::keyword):
3869         (WebCore::BasicShapeCenterCoordinate::length):
3870         (WebCore::BasicShapeCenterCoordinate::blend): Interpolate.
3871         (WebCore::BasicShapeRadius::BasicShapeRadius): Represent the radius of
3872             a new circle shape since it can either be a straightforward Length or
3873             a keyword that cannot be resolved until layout time.
3874         (WebCore::BasicShapeRadius::value):
3875         (WebCore::BasicShapeRadius::type):
3876         (WebCore::BasicShapeRadius::blend): Interpolate.
3877         (WebCore::BasicShapeCircle::centerX):
3878         (WebCore::BasicShapeCircle::centerY):
3879         (WebCore::BasicShapeCircle::radius):
3880         (WebCore::BasicShapeCircle::setCenterX):
3881         (WebCore::BasicShapeCircle::setCenterY):
3882         (WebCore::BasicShapeCircle::setRadius):
3883         (WebCore::BasicShapeCircle::BasicShapeCircle): New circle class.
3884         (WebCore::DeprecatedBasicShapeCircle::create): Rename to make room for
3885             new circle implementation.
3886         (WebCore::DeprecatedBasicShapeCircle::DeprecatedBasicShapeCircle): Ditto.
3887
3888 2013-11-20  Hans Muller  <hmuller@adobe.com>
3889
3890         [CSS Shapes] Add BoxShape and FloatRoundingRect classes
3891         https://bugs.webkit.org/show_bug.cgi?id=124368
3892
3893         Reviewed by Dean Jackson.
3894
3895         Added the BoxShape class. It's now used to represent shape-outside box
3896         values: [margin/border/padding/content]-box. BoxShape depends on a new
3897         FloatRoundedRect class, which is a float analog of the existing (int)
3898         RoundedRect class. The FloatRoundedRect class contains the same basic
3899         methods and accessors as BorderRect and adds a set of four methods,
3900         for example topLeftCorner(), that return a FloatRect that represents the
3901         bounds of one elliptical corner. I also added a method, xInterceptsAtY()
3902         that returns two X coordinates of the intersection between a horizontal
3903         line and the rounded rectangle.
3904
3905         No new tests, this is just an internal refactoring.
3906
3907         * CMakeLists.txt:
3908         * GNUmakefile.list.am:
3909         * WebCore.vcxproj/WebCore.vcxproj:
3910         * WebCore.vcxproj/WebCore.vcxproj.filters:
3911         * WebCore.xcodeproj/project.pbxproj:
3912         * platform/graphics/FloatRoundedRect.cpp: Added.
3913         (WebCore::FloatRoundedRect::FloatRoundedRect):
3914         (WebCore::FloatRoundedRect::Radii::isZero):
3915         (WebCore::FloatRoundedRect::Radii::scale):
3916         (WebCore::FloatRoundedRect::Radii::expand):
3917         (WebCore::cornerRectIntercept):
3918         (WebCore::FloatRoundedRect::xInterceptsAtY):
3919         * platform/graphics/FloatRoundedRect.h: Added.
3920         (WebCore::FloatRoundedRect::Radii::Radii):
3921         (WebCore::FloatRoundedRect::Radii::setTopLeft):
3922         (WebCore::FloatRoundedRect::Radii::setTopRight):
3923         (WebCore::FloatRoundedRect::Radii::setBottomLeft):
3924         (WebCore::FloatRoundedRect::Radii::setBottomRight):
3925         (WebCore::FloatRoundedRect::Radii::topLeft):
3926         (WebCore::FloatRoundedRect::Radii::topRight):
3927         (WebCore::FloatRoundedRect::Radii::bottomLeft):
3928         (WebCore::FloatRoundedRect::Radii::bottomRight):
3929         (WebCore::FloatRoundedRect::Radii::expand):
3930         (WebCore::FloatRoundedRect::Radii::shrink):
3931         (WebCore::FloatRoundedRect::rect):
3932         (WebCore::FloatRoundedRect::radii):
3933         (WebCore::FloatRoundedRect::isRounded):
3934         (WebCore::FloatRoundedRect::isEmpty):
3935         (WebCore::FloatRoundedRect::setRect):
3936         (WebCore::FloatRoundedRect::setRadii):
3937         (WebCore::FloatRoundedRect::move):
3938         (WebCore::FloatRoundedRect::inflate):
3939         (WebCore::FloatRoundedRect::expandRadii):
3940         (WebCore::FloatRoundedRect::shrinkRadii):
3941         (WebCore::FloatRoundedRect::topLeftCorner):
3942         (WebCore::FloatRoundedRect::topRightCorner):
3943         (WebCore::FloatRoundedRect::bottomLeftCorner):
3944         (WebCore::FloatRoundedRect::bottomRightCorner):
3945         (WebCore::operator==):
3946         * rendering/shapes/BoxShape.cpp: Added.
3947         (WebCore::BoxShape::BoxShape):
3948         (WebCore::BoxShape::getExcludedIntervals):
3949         (WebCore::BoxShape::getIncludedIntervals):
3950         (WebCore::BoxShape::firstIncludedIntervalLogicalTop):
3951         * rendering/shapes/BoxShape.h: Added.
3952         * rendering/shapes/Shape.cpp:
3953         (WebCore::createBoxShape):
3954         (WebCore::Shape::createShape):
3955
3956 2013-11-20  Antti Koivisto  <antti@apple.com>
3957
3958         Simple line layout should support floats
3959         https://bugs.webkit.org/show_bug.cgi?id=124666
3960
3961         Reviewed by Dave Hyatt.
3962
3963         Tests: fast/text/simple-lines-float-compare.html
3964                fast/text/simple-lines-float.html
3965
3966         * rendering/line/LineWidth.h:
3967         (WebCore::LineWidth::logicalLeftOffset):
3968         
3969             Expose the left offset so we don't need to recompute it.
3970
3971         * rendering/SimpleLineLayout.cpp:
3972         (WebCore::SimpleLineLayout::canUseFor):
3973         (WebCore::SimpleLineLayout::computeLineLeft):
3974         
3975             Include the left offset from floats.
3976
3977         (WebCore::SimpleLineLayout::createTextRuns):
3978         
3979             Keep the flow height updated during the loop as LineWidth reads the current position from there.
3980
3981         * rendering/SimpleLineLayoutResolver.h:
3982         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
3983         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
3984         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
3985         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
3986         
3987             We now bake the border and the padding to the line left offset. No need to add it during resolve.
3988
3989 2013-11-20  Alexey Proskuryakov  <ap@apple.com>
3990
3991         Use std::function callbacks in CryptoAlgorithm instead of JS promises
3992         https://bugs.webkit.org/show_bug.cgi?id=124673
3993
3994         Reviewed by Anders Carlsson.
3995
3996         To implement key wrapping/unwrapping, we'll need to chain existing operations.
3997         It's much easier to do with C++ callbacks than with functions fulfilling JS
3998         promises directly.
3999
4000         Also, this will decouple CryptoAlgorithm from JS, which is nice.
4001
4002         SubtleCrypto IDL says that all functions return Promise<any>, but in reality,
4003         there is very little polymorphism, the only function whose return type depends
4004         on algorithm is generateKey (it can create a Key or a KeyPair).
4005
4006         * bindings/js/JSDOMPromise.cpp:
4007         (WebCore::PromiseWrapper::PromiseWrapper):
4008         (WebCore::PromiseWrapper::operator=):
4009         * bindings/js/JSDOMPromise.h:
4010         Made it copyable, as each crypto function wraps the promise in success and failure
4011         functional objects now.
4012
4013         * bindings/js/JSSubtleCryptoCustom.cpp:
4014         (WebCore::JSSubtleCrypto::encrypt):
4015         (WebCore::JSSubtleCrypto::decrypt):
4016         (WebCore::JSSubtleCrypto::sign):
4017         (WebCore::JSSubtleCrypto::verify):
4018         (WebCore::JSSubtleCrypto::digest):
4019         (WebCore::JSSubtleCrypto::generateKey):
4020         (WebCore::JSSubtleCrypto::importKey):
4021         (WebCore::JSSubtleCrypto::exportKey):
4022         * crypto/CryptoAlgorithm.cpp:
4023         (WebCore::CryptoAlgorithm::encrypt):
4024         (WebCore::CryptoAlgorithm::decrypt):
4025         (WebCore::CryptoAlgorithm::sign):
4026         (WebCore::CryptoAlgorithm::verify):
4027         (WebCore::CryptoAlgorithm::digest):
4028         (WebCore::CryptoAlgorithm::generateKey):
4029         (WebCore::CryptoAlgorithm::deriveKey):
4030         (WebCore::CryptoAlgorithm::deriveBits):
4031         (WebCore::CryptoAlgorithm::importKey):
4032         * crypto/CryptoAlgorithm.h:
4033         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
4034         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
4035         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
4036         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
4037         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
4038         (WebCore::CryptoAlgorithmAES_CBC::importKey):
4039         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
4040         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
4041         (WebCore::CryptoAlgorithmHMAC::generateKey):
4042         (WebCore::CryptoAlgorithmHMAC::importKey):
4043         * crypto/algorithms/CryptoAlgorithmHMAC.h:
4044         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
4045         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
4046         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
4047         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
4048         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
4049         (WebCore::CryptoAlgorithmSHA1::digest):
4050         * crypto/algorithms/CryptoAlgorithmSHA1.h:
4051         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
4052         (WebCore::CryptoAlgorithmSHA224::digest):