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