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