d1456d030623589ce7a3a6eff5614b2576e925af
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-20  Alexey Proskuryakov  <ap@apple.com>
2
3         REGRESSION (r156140): Srcset tests are frequently crashing
4         https://bugs.webkit.org/show_bug.cgi?id=121695
5
6         Reviewed by Dean Jackson.
7
8         Returning a string created without copying bytes is not safe. It used to be OK
9         because a new string was immediately created by decodeURLEscapeSequences().
10         But even that was not great, because decodeURLEscapeSequences() could potentially
11         return the same string, not a deep copy, if we decided to optimize it like that.
12
13         Also made a number of drive-by style fixes.
14         - It's URL, not Url.
15         - It's srcset, not srcSet.
16         -  We don't add ".0" in floating point value initializers. It's particularly misleading
17         to initialize a float with 1.0, which is a double value.
18         - Renamed srcSetLength to srcsetAttributeLength to match srcsetAttribute variable
19         whose length it caches.
20
21         * html/parser/HTMLParserIdioms.cpp:
22         (WebCore::parseImagesWithScaleFromSrcsetAttribute):
23         (WebCore::bestFitSourceForImageAttributes):
24
25 2013-09-19  Martin Robinson  <mrobinson@igalia.com>
26
27         [GTK] Clean up the Skip* functions in the GObject DOM bindings code generator
28         https://bugs.webkit.org/show_bug.cgi?id=121633
29
30         Reviewed by Gustavo Noronha Silva.
31
32         * bindings/scripts/CodeGeneratorGObject.pm:
33         (SkipAttribute): Fold in some skipping checks that are used by all callers.
34         (SkipFunction): Ditto.
35         (GenerateProperties): Rely on SkipAttribute more thoroughly.
36         (GenerateFunction): Rely on SkipFunction more thoroughly.
37         (GenerateFunctions): Rely on SkipAttribute more thoroughly.
38
39 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
40
41         Fix the build after r156144
42
43         * html/canvas/CanvasRenderingContext2D.cpp: Added missing include.
44
45 2013-09-20  Ryosuke Niwa  <rniwa@webkit.org>
46
47         renderStyleOfEnclosingTextNode should update style before using a renderer
48         https://bugs.webkit.org/show_bug.cgi?id=121690
49
50         Reviewed by Enrica Casucci.
51
52         Merge https://chromium.googlesource.com/chromium/blink/+/65f089545e8c18cb268dfcbe56cba1cd8045527a
53
54         When accessing a renderer editing should always make sure that the style has been updated for the node.
55         Editing calls splitTextNode in a number of places and then accesses the renderer later. This patch is
56         the first of many to make sure editing always updates the style before attempting to access the renderer
57         (or style) of a node after calling a mutation method.
58
59         * editing/ApplyBlockElementCommand.cpp:
60         (WebCore::ApplyBlockElementCommand::renderStyleOfEnclosingTextNode):
61         * editing/ApplyBlockElementCommand.h:
62
63 2013-09-20  Darin Adler  <darin@apple.com>
64
65         Fix a couple more CSS leaks
66         https://bugs.webkit.org/show_bug.cgi?id=121683
67
68         Reviewed by Alexey Proskuryakov.
69
70         * css/CSSDefaultStyleSheets.cpp:
71         (WebCore::CSSDefaultStyleSheets::viewSourceStyle): Put the result of the
72         parseUASheet into a global variable so it doesn't show up as a storage leak.
73
74         * css/CSSGrammar.y.in: Added a missing adoptRef. This was leaking any rule
75         we parsed individually.
76
77 2013-09-20  Bem Jones-Bey  <bjonesbe@adobe.com>
78
79         Simplify the ShapeOutsideInfo and ShapeInfo interfaces
80         https://bugs.webkit.org/show_bug.cgi?id=121685
81
82         Reviewed by Darin Adler.
83
84         With the creation ShapeInfo::computeSegmentsForLine, it became possible to
85         simplify the ShapeInfo classes. ShapeOutsideInfo has no need to save the
86         segments, and now that segment creation is in its own method, it doesn't have
87         to save the segments anymore. This also simplifies the public interface of
88         ShapeOutsideInfo, as it only has one method to do the computation.
89
90         Also, the methods in ShapeOutsideInfo have been renamed to reflect the fact
91         that ShapeOutsideInfo isn't really interested in segments.
92
93         No new tests, no new behavior.
94
95         * rendering/FloatingObjects.cpp:
96         (WebCore::FloatingObjects::logicalLeftOffset):
97         (WebCore::FloatingObjects::logicalRightOffset):
98         * rendering/LineWidth.cpp:
99         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
100         * rendering/shapes/ShapeInfo.cpp:
101         * rendering/shapes/ShapeInfo.h:
102         * rendering/shapes/ShapeInsideInfo.h:
103         * rendering/shapes/ShapeOutsideInfo.cpp:
104         (WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
105         * rendering/shapes/ShapeOutsideInfo.h:
106
107 2013-09-20  Antonio Gomes  <a1.gomes@sisa.samsung.com>
108
109         Making tests added in r156157 JS-only, given that other
110         code generators are still broken.
111
112         Original bug 121305 (StrictTypeChecking extended attribute fails for methods with sequence<T>).
113         https://bugs.webkit.org/show_bug.cgi?id=121305
114
115         Rubber stamped by Alexey Proskuryakov.
116
117         * bindings/scripts/test/TestObj.idl:
118
119 2013-09-20  Jacky Jiang  <zhajiang@blackberry.com>
120
121         [BlackBerry] Poor rendering opening a Google map short link
122         https://bugs.webkit.org/show_bug.cgi?id=121687
123
124         Reviewed by Yong Li.
125         Internally reviewed by Arvid Nilsson.
126
127         JIRA 495023
128         Route lines on google map were shown even they were on a hidden canvas.
129         Include visibility on LayerWebKitThread if it's a canvas layer and respect
130         the visibility when compositing layers in LayerRenderer.
131
132         * platform/graphics/blackberry/LayerData.h:
133         (WebCore::LayerData::isCanvasLayer):
134         (WebCore::LayerData::isVisible):
135         (WebCore::LayerData::includeVisibility):
136         * platform/graphics/blackberry/LayerRenderer.cpp:
137         (WebCore::LayerRenderer::compositeLayersRecursive):
138
139 2013-09-20  Sam White  <samuel_white@apple.com>
140
141         AX: WebArea claims to have a subrole, but always returns nil.
142         https://bugs.webkit.org/show_bug.cgi?id=121658
143
144         Reviewed by Chris Fleizach.
145
146         No new tests, updated existing AXWebArea related test to reflect unused attribute removal.
147
148         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
149         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
150
151 2013-09-20  Andreas Kling  <akling@apple.com>
152
153         Add valueForLength/minimumValueForLength wrappers to RenderElement.
154         <https://webkit.org/b/121676>
155
156         Reviewed by Antti Koivisto.
157
158         Add two inline wrappers for these functions so we don't have to pass
159         the RenderView everywhere.
160
161 2013-09-20  Martin Robinson  <mrobinson@igalia.com>
162
163         [GTK] Fix some small style issues in the bindings
164         https://bugs.webkit.org/show_bug.cgi?id=121613
165
166         Reviewed by Carlos Garcia Campos.
167
168         * bindings/scripts/CodeGeneratorGObject.pm: When printing the license
169         header use the more common comment style within the WebKit project.
170         (GenerateProperty): Indent property definitions according to WebKit style, improve
171         the nick and blurb properties, and improve the various parameter spec argument layout.
172         (GenerateFunction): Remove the newline from function signatures to match WebKit style.
173         * bindings/scripts/test/GObject: Update bindings test results.
174
175 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
176
177         [CMake] Use COMPILE_DEFINITIONS target property for setting BUILDING_* defines
178         https://bugs.webkit.org/show_bug.cgi?id=121672
179
180         Reviewed by Gyuyoung Kim.
181
182         Since the scope of add_definitions() is always a whole file, we need to use
183         target properties instead to set definitions only for specific targets.
184
185         * CMakeLists.txt:
186
187 2013-09-18  Antonio Gomes  <a1.gomes@sisa.samsung.com>
188
189         Make "autoscroll for drag'n drop" a setting
190         https://bugs.webkit.org/show_bug.cgi?id=121559
191
192         Reviewed by Ryosuke Niwa.
193
194         Currently, there is a ChromeClient hook to make the
195         feature opt'ed-in or out. That makes it harder to test the
196         feature on ports that do not enable it, e.g. Mac/WebKit2 port.
197         However, Mac/WebKit2 is the port that has the best drag'n drop
198         WTR implementation.
199
200         Patch changes the toggle on/off mechanism to be a setting,
201         and exposes it through InternalSetting interface for testing.
202
203         * page/AutoscrollController.cpp:
204         (WebCore::AutoscrollController::updateDragAndDrop):
205         * page/ChromeClient.h:
206         * page/Settings.in:
207         * testing/InternalSettings.cpp:
208         (WebCore::InternalSettings::Backup::Backup):
209         (WebCore::InternalSettings::Backup::restoreTo):
210         (WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled):
211         * testing/InternalSettings.h:
212         * testing/InternalSettings.idl:
213
214 2013-09-16  Antonio Gomes  <a1.gomes@sisa.samsung.com>
215
216         StrictTypeChecking extended attribute fails for methods with sequence<T>
217         https://bugs.webkit.org/show_bug.cgi?id=121305
218
219         Reviewed by Darin Adler.
220
221         The extended attribute StrictTypeChecking can not be set to methods if
222         one of the parameters is a "sequence".
223         Basically, since "sequence" is not considered a native type
224         (see function IsNativeType) the Perl code generator tries to
225         include its supposedly associated header, in this case "JSsequence.h"
226         Compilation then fails.
227
228         It is a problem for bindings including WebGL, where all methods
229         are supposed to be set as StrictTypeChecking (see bug 44202 [1]). Due to this restriction,
230         it relaxed, but I would like to bring it back.
231
232         Patch fixes the issue by hardening the way includes are auto-added
233         for methods where StrictTypeChecking extended attribute is present.
234         Now, only wrapper types (see IsWrapperType) trigger header inclusion,
235         excluding arrays, sequences, basic types, etc.
236
237         [1] https://bugs.webkit.org/show_bug.cgi?id=44202
238
239         * bindings/scripts/CodeGeneratorJS.pm:
240         (GenerateParametersCheck):
241         * bindings/scripts/test/JS/JSTestObj.cpp:
242         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
243         * bindings/scripts/test/JS/JSTestObj.h:
244         * bindings/scripts/test/TestObj.idl:
245
246 2013-09-20  Andreas Kling  <akling@apple.com>
247
248         Optimize fetching the Node for never-anonymous renderers.
249         <https://webkit.org/b/121627>
250
251         Reviewed by Antti Koivisto.
252
253         Add a RenderObject::nodeForNonAnonymous() that can be used instead
254         of node() when a renderer is guaranteed non-anonymous.
255
256         Use this to implement reference element getters for the various
257         renderers that are known at compile-time to correspond to a DOM node.
258
259         Also renamed existingElement() => element() since using an alternate
260         name for a reference overload isn't actually necessary.
261
262 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
263
264         Remove duplicated secondsPerDay variables
265         https://bugs.webkit.org/show_bug.cgi?id=121601
266
267         Reviewed by Andreas Kling.
268
269         Use secondsPerDay from DateMath.h instead of defining it again.
270
271         * history/HistoryItem.cpp:
272         (WebCore::timeToDay):
273
274 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
275
276         Fix duplicated loop variable names after r155743
277         https://bugs.webkit.org/show_bug.cgi?id=121667
278
279         Reviewed by Andreas Kling.
280
281         Do not use the same name for variables in nested loops to fix a compiler warning.
282
283         * page/animation/CSSPropertyAnimation.cpp:
284         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
285
286 2013-09-20  Antti Koivisto  <antti@apple.com>
287
288         Make RenderObject::parent() return RenderElement
289         https://bugs.webkit.org/show_bug.cgi?id=121671
290
291         Reviewed by Andreas Kling.
292
293         Make RenderObject::parent() return RenderElement and adopt everywhere.
294         Moved addChild/removeChild from RenderObject to RenderElement.
295         Uninlined a few big RenderObject functions.
296         Renamed RenderObject::remove() -> RenderObject::removeFromParent()
297
298 2013-09-20  Csaba Osztrogonác  <ossy@webkit.org>
299
300         Buildfix after r156133 for !ENABLE(WORKERS) platforms
301         https://bugs.webkit.org/show_bug.cgi?id=121669
302
303         Reviewed by Antti Koivisto.
304
305         * platform/ThreadGlobalData.cpp:
306         * platform/ThreadGlobalData.h:
307
308 2013-09-20  Antti Koivisto  <antti@apple.com>
309
310         Make createRenderer() return RenderElement
311         https://bugs.webkit.org/show_bug.cgi?id=121666
312
313         Rubber-stamped by Andreas Kling.
314         
315         Tighter typing.
316
317 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
318
319         Buildfix for ENABLE(CSS_FILTERS) && !ENABLE(ACCELERATED_COMPOSITING) after r155131.
320
321         * rendering/RenderLayer.cpp:
322         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
323
324 2013-09-20  Patrick Gansterer  <paroga@webkit.org>
325
326         [WIN] Fix build without precompiled header after r154146.
327
328         * platform/win/WebCoreBundleWin.cpp:
329
330 2013-09-20  Antti Koivisto  <antti@apple.com>
331
332         Add covariant RenderElement* Element::renderer()
333         https://bugs.webkit.org/show_bug.cgi?id=121638
334
335         Reviewed by Andreas Kling.
336
337         Also add isRenderElement() test and casting functions.
338
339 2013-09-19  Anders Carlsson  <andersca@apple.com>
340
341         Handle null font families.
342
343         Reviewed by Darin Adler.
344
345         * platform/graphics/Font.cpp:
346         (WebCore::computeFontGlyphsCacheHash):
347         Don't crash when trying to hash null strings.
348
349 2013-09-19  Darin Adler  <darin@apple.com>
350
351         Fix a couple mistakes in my recent CSS grammar leak patch
352         https://bugs.webkit.org/show_bug.cgi?id=121659
353
354         Reviewed by Alexey Proskuryakov.
355
356         * css/CSSGrammar.y.in: Added initialization to nullptr for some error cases
357         that were otherwise leaving a bad value for the result of the production.
358         Also fixed a reversed logical expression.
359
360 2013-09-19  Yoav Weiss  <yoav@yoav.ws>
361
362         Remove URL decoding in srcset handling
363         https://bugs.webkit.org/show_bug.cgi?id=121609
364
365         Reviewed by Benjamin Poulain.
366
367         Tests: fast/hidpi/image-srcset-question-mark.html
368                fast/loader/image-src-question-mark.html
369
370         Removed URL decoding from src and srcset's handling algorithm, since they break encoded URLS.
371
372         * html/parser/HTMLParserIdioms.cpp:
373         (WebCore::parseImagesWithScaleFromSrcSetAttribute):
374         (WebCore::bestFitSourceForImageAttributes):
375
376 2013-09-19  Anders Carlsson  <andersca@apple.com>
377
378         Avoid calling AtomicString::lower() in makeFontGlyphsCacheKey
379         https://bugs.webkit.org/show_bug.cgi?id=121656
380
381         Reviewed by Darin Adler.
382
383         Instead of lower casing AtomicStrings, store the strings as is and use the case folding
384         hash and case insensitive compare to determine equality.
385
386         * platform/graphics/Font.cpp:
387         (WebCore::operator==):
388         (WebCore::makeFontGlyphsCacheKey):
389         (WebCore::computeFontGlyphsCacheHash):
390
391 2013-09-19  Darin Adler  <darin@apple.com>
392
393         Fix leaks in CSS parser caused by overwriting owned raw pointers with 0
394         https://bugs.webkit.org/show_bug.cgi?id=121655
395
396         Reviewed by Anders Carlsson.
397
398         * css/CSSGrammar.y.in: Use nullptr instead of 0. Use unique_ptr instead
399         of a raw pointer in cases where we might or might not actually keep
400         the allocated memory. This can still be cleaned up further, but this
401         should fix the memory leaks we have been seeing.
402
403 2013-09-19  Eric Carlson  <eric.carlson@apple.com>
404
405         MediaStream API: update MediaStreamTrackEvent object to match spec
406         https://bugs.webkit.org/show_bug.cgi?id=121624
407
408         Reviewed by Dean Jackson.
409
410         Test: fast/mediastream/MediaStreamTrackEvent-constructor.html
411
412         * Modules/mediastream/MediaStreamTrack.idl: Remove NoInterfaceObject.
413
414         * Modules/mediastream/MediaStreamTrackEvent.cpp: 
415         (WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit): New.
416         (WebCore::MediaStreamTrackEvent::create): New form that takes an initialize.
417         (WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent): Ditto.
418         * Modules/mediastream/MediaStreamTrackEvent.h:
419         * Modules/mediastream/MediaStreamTrackEvent.idl:
420
421         * bindings/js/JSDictionary.cpp:
422         (WebCore::JSDictionary::convertValue): New.
423         * bindings/js/JSDictionary.h:
424
425 2013-09-19  Anders Carlsson  <andersca@apple.com>
426
427         Remove #if !ENABLE(WORKERS) code in ThreadGlobalData
428         https://bugs.webkit.org/show_bug.cgi?id=121649
429
430         Reviewed by Sam Weinig.
431
432         This lets us remove a FIXME. Also, move threadGlobalData out of line; there's no need for it to be inline.
433
434         * WebCore.exp.in:
435         * platform/ThreadGlobalData.cpp:
436         (WebCore::threadGlobalData):
437         * platform/ThreadGlobalData.h:
438
439 2013-09-19  Anders Carlsson  <andersca@apple.com>
440
441         Modernize Length setters/getters
442         https://bugs.webkit.org/show_bug.cgi?id=121647
443
444         Reviewed by Andreas Kling.
445
446         Add a move constructor and move assignment operator to Length and fixup some of the getters and setters.
447
448         * css/CSSComputedStyleDeclaration.cpp:
449         (WebCore::getBorderRadiusCornerValues):
450         (WebCore::getBorderRadiusCornerValue):
451         * css/DeprecatedStyleBuilder.cpp:
452         (WebCore::ApplyPropertyLength::setValue):
453         (WebCore::ApplyPropertyLength::createHandler):
454         (WebCore::ApplyPropertyBorderRadius::setValue):
455         (WebCore::ApplyPropertyBorderRadius::createHandler):
456         (WebCore::ApplyPropertyLineHeight::createHandler):
457         * page/animation/CSSPropertyAnimation.cpp:
458         (WebCore::LengthPropertyWrapper::LengthPropertyWrapper):
459         (WebCore::LengthPropertyWrapper::blend):
460         (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
461         (WebCore::FillLayerPropertyWrapper::blend):
462         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
463         * platform/CalculationValue.h:
464         (WebCore::CalcExpressionLength::CalcExpressionLength):
465         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
466         * platform/Length.cpp:
467         (WebCore::CalculationValueHandleMap::remove):
468         (WebCore::CalculationValueHandleMap::find):
469         (WebCore::Length::decrementCalculatedRef):
470         * platform/Length.h:
471         (WebCore::Length::Length):
472         (WebCore::Length::operator=):
473         (WebCore::Length::moveFromLength):
474         * platform/LengthBox.cpp:
475         (WebCore::LengthBox::logicalLeft):
476         (WebCore::LengthBox::logicalRight):
477         (WebCore::LengthBox::before):
478         (WebCore::LengthBox::after):
479         (WebCore::LengthBox::start):
480         (WebCore::LengthBox::end):
481         * platform/LengthBox.h:
482         (WebCore::LengthBox::LengthBox):
483         (WebCore::LengthBox::left):
484         (WebCore::LengthBox::right):
485         (WebCore::LengthBox::top):
486         (WebCore::LengthBox::bottom):
487         * platform/LengthSize.h:
488         (WebCore::LengthSize::LengthSize):
489         (WebCore::LengthSize::setWidth):
490         (WebCore::LengthSize::width):
491         (WebCore::LengthSize::setHeight):
492         (WebCore::LengthSize::height):
493         * platform/graphics/filters/FilterOperation.h:
494         (WebCore::FilterOperation::BlurFilterOperation::create):
495         (WebCore::FilterOperation::BlurFilterOperation::stdDeviation):
496         (WebCore::FilterOperation::BlurFilterOperation::BlurFilterOperation):
497         * rendering/style/BasicShapes.h:
498         (WebCore::BasicShapeRectangle::x):
499         (WebCore::BasicShapeRectangle::y):
500         (WebCore::BasicShapeRectangle::width):
501         (WebCore::BasicShapeRectangle::height):
502         (WebCore::BasicShapeRectangle::cornerRadiusX):
503         (WebCore::BasicShapeRectangle::cornerRadiusY):
504         (WebCore::BasicShapeRectangle::setX):
505         (WebCore::BasicShapeRectangle::setY):
506         (WebCore::BasicShapeRectangle::setWidth):
507         (WebCore::BasicShapeRectangle::setHeight):
508         (WebCore::BasicShapeRectangle::setCornerRadiusX):
509         (WebCore::BasicShapeRectangle::setCornerRadiusY):
510         (WebCore::BasicShapeCircle::centerX):
511         (WebCore::BasicShapeCircle::centerY):
512         (WebCore::BasicShapeCircle::radius):
513         (WebCore::BasicShapeCircle::setCenterX):
514         (WebCore::BasicShapeCircle::setCenterY):
515         (WebCore::BasicShapeCircle::setRadius):
516         (WebCore::BasicShapeEllipse::centerX):
517         (WebCore::BasicShapeEllipse::centerY):
518         (WebCore::BasicShapeEllipse::radiusX):
519         (WebCore::BasicShapeEllipse::radiusY):
520         (WebCore::BasicShapeEllipse::setCenterX):
521         (WebCore::BasicShapeEllipse::setCenterY):
522         (WebCore::BasicShapeEllipse::setRadiusX):
523         (WebCore::BasicShapeEllipse::setRadiusY):
524         (WebCore::BasicShapePolygon::getXAt):
525         (WebCore::BasicShapePolygon::getYAt):
526         (WebCore::BasicShapePolygon::appendPoint):
527         (WebCore::BasicShapeInsetRectangle::top):
528         (WebCore::BasicShapeInsetRectangle::right):
529         (WebCore::BasicShapeInsetRectangle::bottom):
530         (WebCore::BasicShapeInsetRectangle::left):
531         (WebCore::BasicShapeInsetRectangle::cornerRadiusX):
532         (WebCore::BasicShapeInsetRectangle::cornerRadiusY):
533         (WebCore::BasicShapeInsetRectangle::setTop):
534         (WebCore::BasicShapeInsetRectangle::setRight):
535         (WebCore::BasicShapeInsetRectangle::setBottom):
536         (WebCore::BasicShapeInsetRectangle::setLeft):
537         (WebCore::BasicShapeInsetRectangle::setCornerRadiusX):
538         (WebCore::BasicShapeInsetRectangle::setCornerRadiusY):
539         * rendering/style/FillLayer.h:
540         (WebCore::FillSize::FillSize):
541         (WebCore::FillLayer::xPosition):
542         (WebCore::FillLayer::yPosition):
543         (WebCore::FillLayer::sizeLength):
544         (WebCore::FillLayer::setXPosition):
545         (WebCore::FillLayer::setYPosition):
546         * rendering/style/NinePieceImage.cpp:
547         (WebCore::NinePieceImage::NinePieceImage):
548         * rendering/style/NinePieceImage.h:
549         (WebCore::NinePieceImage::setImageSlices):
550         (WebCore::NinePieceImage::setBorderSlices):
551         (WebCore::NinePieceImage::setOutset):
552         (WebCore::NinePieceImage::computeOutset):
553         * rendering/style/RenderStyle.cpp:
554         (WebCore::RenderStyle::specifiedLineHeight):
555         * rendering/style/RenderStyle.h:
556         * rendering/style/StyleBoxData.h:
557         (WebCore::StyleBoxData::width):
558         (WebCore::StyleBoxData::height):
559         (WebCore::StyleBoxData::minWidth):
560         (WebCore::StyleBoxData::minHeight):
561         (WebCore::StyleBoxData::maxWidth):
562         (WebCore::StyleBoxData::maxHeight):
563         (WebCore::StyleBoxData::verticalAlign):
564         * rendering/style/StyleReflection.h:
565         (WebCore::StyleReflection::offset):
566         (WebCore::StyleReflection::setOffset):
567
568 2013-09-19  Andreas Kling  <akling@apple.com>
569
570         Out-of-line InspectorValues create() methods.
571         <https://webkit.org/b/121639>
572
573         Reviewed by Joseph Pecoraro.
574
575         These functions are hardly performance-critical and are taking up
576         quite a lot of space.
577
578         Shrinks the WebCore binary by 70500 bytes.
579
580 2013-09-19  Alexey Proskuryakov  <ap@apple.com>
581
582         Layout Test http/tests/security/canvas-remote-read-remote-image-redirect.html is flaky
583         https://bugs.webkit.org/show_bug.cgi?id=121458
584
585         Reviewed by Sam Weinig.
586
587         The code to automagically produce line numbers is quite fragile. Added some FIXMEs,
588         and added an issue that was making reporting flaky for code is JS event handlers
589         executed while parsing was paused.
590
591         * page/PageConsole.cpp: (WebCore::PageConsole::addMessage): Use actual "script is
592         running" check instead of "parsing a script element" one.
593
594 2013-09-18  Ryosuke Niwa  <rniwa@webkit.org>
595
596         Remove superfluous CSSLinearTimingFunctionValue and use switch on TimingFunction::type() in more places
597         https://bugs.webkit.org/show_bug.cgi?id=121589
598
599         Reviewed by Dean Jackson.
600  
601         Replaced CSSLinearTimingFunctionValue by the identifier "linear" and used switch statements on
602         TimingFunction::type() in more places where we were branching on every type.
603
604         Merge https://chromium.googlesource.com/chromium/blink/+/5454f20c71090c35bdd1053e5cc572d5c0bdede7
605         Merge https://chromium.googlesource.com/chromium/blink/+/104ad42c523d32b67d108c6e59f4f27488fe38a5
606
607         * css/CSSComputedStyleDeclaration.cpp:
608         (WebCore::createTimingFunctionValue):
609         * css/CSSTimingFunctionValue.cpp:
610         * css/CSSTimingFunctionValue.h:
611         * css/CSSToStyleMap.cpp:
612         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
613         * css/CSSValue.cpp:
614         (WebCore::CSSValue::equals):
615         (WebCore::CSSValue::cssText):
616         (WebCore::CSSValue::destroy):
617         * css/CSSValue.h:
618         (WebCore::CSSValue::isCubicBezierTimingFunctionValue):
619         * page/animation/AnimationBase.cpp:
620         (WebCore::AnimationBase::progress):
621
622 2013-09-19  Commit Queue  <commit-queue@webkit.org>
623
624         Unreviewed, rolling out r156119.
625         http://trac.webkit.org/changeset/156119
626         https://bugs.webkit.org/show_bug.cgi?id=121640
627
628         broke builds in various ways (Requested by anttik on #webkit).
629
630         * accessibility/AccessibilitySpinButton.cpp:
631         * bindings/scripts/CodeGeneratorObjC.pm:
632         (GenerateImplementation):
633         * css/SelectorChecker.cpp:
634         * dom/ContainerNode.h:
635         * dom/Element.h:
636         * dom/PseudoElement.cpp:
637         (WebCore::PseudoElement::didAttachRenderers):
638         * editing/SplitTextNodeContainingElementCommand.cpp:
639         (WebCore::SplitTextNodeContainingElementCommand::doApply):
640         * editing/TypingCommand.cpp:
641         * html/ImageDocument.cpp:
642         * page/PageSerializer.cpp:
643         * rendering/RenderElement.h:
644         * rendering/RenderObject.h:
645         * svg/SVGAnimatedColor.cpp:
646         (WebCore::adjustForCurrentColor):
647         * svg/SVGLocatable.cpp:
648         * svg/graphics/filters/SVGFEImage.cpp:
649         (WebCore::FEImage::determineAbsolutePaintRect):
650         (WebCore::FEImage::referencedRenderer):
651         * svg/graphics/filters/SVGFEImage.h:
652
653 2013-09-19  Antti Koivisto  <antti@apple.com>
654
655         Add covariant RenderElement* Element::renderer()
656         https://bugs.webkit.org/show_bug.cgi?id=121638
657
658         Reviewed by Andreas Kling.
659
660         Also add isRenderElement() test and casting functions.
661
662 2013-09-19  Andreas Kling  <akling@apple.com>
663
664         Streamline JSMainThreadNullState.
665         <https://webkit.org/b/121636>
666
667         Reviewed by Anders Carlsson.
668
669         JSMainThreadNullState is only used by non-JavaScript bindings and
670         thus won't ever call didLeaveScriptContext() on destruction.
671         Specialize the class for its use-case instead of sharing code
672         with JSMainThreadExecState.
673
674         Shrinks the WebCore binary by 82848 bytes.
675
676 2013-09-19  Bear Travis  <betravis@adobe.com>
677
678         CSS_SHAPES not supported on AppleWin port
679         https://bugs.webkit.org/show_bug.cgi?id=118810
680
681         Reviewed by Brent Fulgham.
682
683         Enabling fast/shapes on windows.
684
685         * WebCore.vcxproj/WebCore.vcxproj: Add missing shape includes.
686         * WebCore.vcxproj/WebCoreCommon.props: Include shapes source folder.
687         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy shapes headers.
688         * css/CSSPropertyNames.in: Tweak to ensure shapes properties are regenerated.
689
690 2013-09-19  Andreas Kling  <akling@apple.com>
691
692         Add SVGPropertyInfo.cpp
693         <https://webkit.org/b/121622>
694
695         Reviewed by Anders Carlsson.
696
697         Add a cpp file for this class to make it more hackable.
698
699         * CMakeLists.txt:
700         * GNUmakefile.list.am:
701         * Target.pri:
702         * WebCore.vcxproj/WebCore.vcxproj:
703         * WebCore.vcxproj/WebCore.vcxproj.filters:
704         * WebCore.xcodeproj/project.pbxproj:
705         * svg/properties/SVGPropertyInfo.cpp: Added.
706         (WebCore::SVGPropertyInfo::SVGPropertyInfo):
707         * svg/properties/SVGPropertyInfo.h:
708
709 2013-09-19  Eric Carlson  <eric.carlson@apple.com>
710
711         MediaStream API: update NavigatorUserMediaError object to match spec
712         https://bugs.webkit.org/show_bug.cgi?id=121584
713
714         Reviewed by Dean Jackson.
715
716         No new tests, updated getusermedia.html.
717
718         * CMakeLists.txt: Add NavigatorUserMediaError.cpp.
719         * GNUmakefile.list.am: Ditto.
720
721         * Modules/mediastream/NavigatorUserMediaError.cpp: Added.
722         * Modules/mediastream/NavigatorUserMediaError.h: Derive from DOMError, get rid of "message" attribute.
723         * Modules/mediastream/NavigatorUserMediaError.idl: Ditto.
724
725         * Modules/mediastream/UserMediaRequest.cpp:
726         (WebCore::UserMediaRequest::create): ASCIILiteral -> AtomicString. Rename constraint parameters.
727         (WebCore::UserMediaRequest::UserMediaRequest): Rename constraint parameters.
728         (WebCore::UserMediaRequest::audioConstraints): Return PassRefPtr<> instead of raw ptr.
729         (WebCore::UserMediaRequest::videoConstraints): Ditto.
730         (WebCore::UserMediaRequest::ownerDocument): Clean up style.
731         (WebCore::UserMediaRequest::succeed): 
732         (WebCore::UserMediaRequest::permissionFailure): Renamed from fail.
733         (WebCore::UserMediaRequest::constraintFailure):  Renamed from failConstraint.
734         (WebCore::UserMediaRequest::callSuccessHandler): New.
735         (WebCore::UserMediaRequest::callErrorHandler): New.
736         * Modules/mediastream/UserMediaRequest.h:
737
738         * WebCore.xcodeproj/project.pbxproj: Add NavigatorUserMediaError.cpp
739
740         * dom/DOMError.h: Make constructor protected.
741
742         * platform/mediastream/MediaStreamSourcesQueryClient.h: Make constraints available.
743
744 2013-09-19  Bem Jones-Bey  <bjonesbe@adobe.com>
745
746         Fix handling of top margin on float with shape-outside
747         https://bugs.webkit.org/show_bug.cgi?id=121614
748
749         Reviewed by Alexandru Chiculita.
750
751         When a float has shape outside, the top margin should be treated as if
752         there is no shape there, so inline content should be allowed to flow
753         into that space. This patch fixes two issues:
754         
755         1) If the top margin is the same as the line height, a line should be
756         able to fit into the margin. Before this patch, that line was being
757         treated as if it intersected with the shape.
758         
759         2) The shape should be positioned (x, y) relative to the box sizing
760         box of the float. While the x coordinate was being treated properly,
761         the y coordinate was relative to the top of the margin box. This patch
762         fixes this behavior.
763         
764         This patch also includes a simple test for right and left margins, as
765         I wrote that test and then discovered the problems listed above.
766         
767         This patch also removes an unused override of the
768         lineOverlapsShapeBounds method.
769
770         Tests: csswg/submitted/shapes/shape-outside/shape-outside-floats-margin-000.html
771                csswg/submitted/shapes/shape-outside/shape-outside-floats-margin-001.html
772
773         * rendering/FloatingObjects.cpp:
774         (WebCore::FloatingObjects::logicalLeftOffset): 
775         (WebCore::FloatingObjects::logicalRightOffset):
776         * rendering/LineWidth.cpp:
777         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
778         * rendering/shapes/ShapeInfo.h:
779         * rendering/shapes/ShapeInsideInfo.h:
780         * rendering/shapes/ShapeOutsideInfo.cpp:
781         (WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
782         * rendering/shapes/ShapeOutsideInfo.h:
783
784 2013-09-19  Antti Koivisto  <antti@apple.com>
785
786         Add RenderElement
787         https://bugs.webkit.org/show_bug.cgi?id=121608
788
789         Reviewed by Dave Hyatt.
790
791         Add a common base class for all Element renderers. The class hierarchy will now look like this
792         
793         RenderObject
794             RenderText
795             RenderElement
796                 RenderLayerModelObject
797                     ...
798                 RenderSVGModelObject
799                     ...
800                 RenderSVGGradientStop
801                 
802         This will allow tighter typing in both render and DOM trees.
803         
804         The patch also moves renderer factory function to RenderElement::createFor().
805
806 2013-09-19  Alexey Proskuryakov  <ap@apple.com>
807
808         REGRESSION (r149928): CanvasStyle::operator= leaks everything
809         https://bugs.webkit.org/show_bug.cgi?id=121591
810
811         Reviewed by Andreas Kling.
812
813         * html/canvas/CanvasStyle.cpp: (WebCore::CanvasStyle::operator=): Don't leak.
814
815 2013-09-19  Andrei Parvu  <parvu@adobe.com>
816
817         [CSS Masking/Background] Position property should be ignored when using repeat: space
818         https://bugs.webkit.org/show_bug.cgi?id=120623
819
820         The background/mask-position should be ignored when using repeat: space,
821         unless there is not enough space for two copies of the image. In that case,
822         only one image is placed and background/mask-position determines its position.
823
824         Reviewed by Dirk Schulze.
825
826         Test: css3/masking/mask-repeat-one-copy.html
827
828         * rendering/RenderBoxModelObject.cpp: Ignored position property if space value is positive, set no-repeat otherwise.
829         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
830
831 2013-09-19  Andreas Kling  <akling@apple.com>
832
833         CTTE: EllipsisBox::renderer() should return RenderBlock&.
834         <https://webkit.org/b/121604>
835
836         Reviewed by Antti Koivisto.
837
838         I missed adding a renderer() overload when fixing up EllipsisBox.
839         Flushed out one unnecessary type check.
840
841 2013-09-19  Andreas Kling  <akling@apple.com>
842
843         CTTE: Tighten renderer types for InlineTextBox and SVGInlineTextBox.
844         <https://webkit.org/b/121605>
845
846         Reviewed by Antti Koivisto.
847
848         Codify the following:
849
850         - InlineTextBox always has a RenderText.
851         - SVGInlineTextBox always has a RenderSVGInlineText.
852
853         Removed InlineTextBox::textRenderer() and make renderer() simply
854         return a RenderText&/RenderSVGInlineText& instead.
855
856         This turns some node() accessors into textNode() and removes a host
857         of casts and assertions.
858
859 2013-09-19  Antti Koivisto  <antti@apple.com>
860
861         [CTTE] Hide nonPseudoNode and generatingNode, replace with Element versions
862         https://bugs.webkit.org/show_bug.cgi?id=121606
863
864         Reviewed by Andreas Kling.
865
866 2013-09-19  Andreas Kling  <akling@apple.com>
867
868         CTTE: Tighten renderer types for InlineFlowBox and SVGInlineFlowBox.
869         <https://webkit.org/b/121603>
870
871         Reviewed by Antti Koivisto.
872
873         Codify the following:
874
875         - InlineFlowBox always has a RenderBoxModelObject.
876         - SVGInlineFlowBox always has a RenderSVGInline.
877
878         This turns some node() accessors into element(). Neato!
879
880 2013-09-19  Gurpreet Kaur  <k.gurpreet@samsung.com>
881
882         CSS Unit vmax and vmin in border-width not handled.
883         https://bugs.webkit.org/show_bug.cgi?id=121421
884
885         Reviewed by Darin Adler.
886
887         Border properties were not applied incase its values 
888         were given in vmax/vmin units.
889
890         Tests: fast/css/viewport-vmax-border.html
891                fast/css/viewport-vmin-border.html
892
893         * css/CSSPrimitiveValue.cpp:
894         (WebCore::CSSPrimitiveValue::computeLengthDouble):
895         * css/CSSPrimitiveValue.h:
896         (WebCore::CSSPrimitiveValue::isViewportPercentageMax):
897         (WebCore::CSSPrimitiveValue::isViewportPercentageMin):
898         * css/DeprecatedStyleBuilder.cpp:
899         (WebCore::ApplyPropertyComputeLength::applyValue):
900         Calculating the border values which has been specified in
901         vmax/vmin units. 1vmax: 1vw or 1vh, whatever is largest.
902         1vmin: 1vw or 1vh, whatever is smallest. The vh/vw units are 
903         calcultated as percent of viewport height and viewport width respectively.
904
905 2013-09-19  Antti Koivisto  <antti@apple.com>
906
907         [CTTE] RenderText is always anonymous or associated with Text node
908         https://bugs.webkit.org/show_bug.cgi?id=121596
909
910         Reviewed by Andreas Kling.
911
912         Tighten the node type of RenderText and its subclasses to Text.
913         Switch to createAnonymous pattern.
914         Switch a bunch of unnecessary StringImpl* use to Strings.
915
916 2013-09-18  Mihnea Ovidenie  <mihnea@adobe.com>
917
918         Unreviewed build fix after 156082. Guard SVG code with defines.
919
920         * rendering/RenderNamedFlowThread.cpp:
921         (WebCore::nextNodeInsideContentNode):
922
923 2013-09-18  Mihnea Ovidenie  <mihnea@adobe.com>
924
925         [CSSRegions] Failed to retrieve named flow ranges for content with inline svg
926         https://bugs.webkit.org/show_bug.cgi?id=121489
927
928         Reviewed by David Hyatt.
929
930         The inline SVG element behaves like a replaced element in HTML context. When computing the ranges
931         that are displayed inside a region for a named flow that contains an inline SVG element, we have
932         to treat the SVG as a replaced and run the checks only for the SVG root element, skipping the
933         other SVG elements inside.
934
935         Test: fast/regions/get-region-flow-ranges-inline-svg.html
936
937         * rendering/RenderNamedFlowThread.cpp:
938         (WebCore::nextNodeInsideContentNode): Add function to retrieve the next node in traversal
939         under the contentNode subtree that should be used for getRanges inspection.
940         (WebCore::RenderNamedFlowThread::getRanges): Replace NodeTravesal::next with nextNodeInsideContentNode.
941
942 2013-09-18  Bem Jones-Bey  <bjonesbe@adobe.com>
943
944         REGRESSION (r155854 - r155967) block with margin-left adjacent to floated block causes text of subsequent blocks to overlap the floated block.
945         https://bugs.webkit.org/show_bug.cgi?id=121532
946
947         Reviewed by Andreas Kling.
948
949         When refactoring the code, I ended up adding the margin in instead of
950         subtracting it in the case of an intruding float. This patch fixes
951         that so that the margin is properly handled.
952
953         Test: fast/block/float/intruding-float-sibling-with-margin.html
954
955         * rendering/RenderBlock.cpp:
956         (WebCore::RenderBlock::addIntrudingFloats):
957
958 2013-09-18  Ryosuke Niwa  <rniwa@webkit.org>
959
960         Merge HTMLBodyElement::didNotifySubtreeInsertions into HTMLBodyElement::insertedInto
961         https://bugs.webkit.org/show_bug.cgi?id=121576
962
963         Reviewed by Andreas Kling.
964
965         Merge https://chromium.googlesource.com/chromium/blink/+/2a9cac908f4eceadfcf9d21bdf5b3e598075aa1f
966
967         The logic in didNotifySubtreeInsertions to set the marginwidth and marginheight attributes
968         on the <body> of elements inside <iframe> and <frame> doesn't need to run after inserting
969         all the children of the frame. In fact this means that when you have those attributes
970         and then the script in the iframe touches offsetLeft or any layout dependent property
971         we'll layout with the wrong values and then have to do another layout after these margin
972         attributes are set.
973
974         I also remove the scheduleRelayout() call that was inside didNotifySubtreeInsertions. This
975         call doesn't make any sense, inserting a <body> will always trigger a style recalc and
976         a subsequent layout. The code is 9 years old: https://trac.webkit.org/changeset/8122
977         and all tests run fine without it.
978
979         * html/HTMLBodyElement.cpp:
980         (WebCore::HTMLBodyElement::insertedInto):
981         * html/HTMLBodyElement.h:
982         * html/HTMLFrameElementBase.h:
983         (WebCore::isHTMLFrameElementBase):
984         (WebCore::toHTMLFrameElementBase):
985
986 2013-09-18  Jer Noble  <jer.noble@apple.com>
987
988         [MSE] Throw exception when setting timestampOffset while 'updating' state is set.
989         https://bugs.webkit.org/show_bug.cgi?id=121561
990
991         Reviewed by Eric Carlson.
992
993         Tests: Updated http/tests/media/media-source/mediasource-append-buffer.html.
994
995         Merge https://chromium.googlesource.com/chromium/blink/+/25285998be3d0edcd951d12d445a7375e50e512c
996         by Changbin Shao.
997
998         The Media Source Extensions spec requires that an exception be thrown if the 'updating' attribute
999         equals true while setting the timestampOffset of a SourceBuffer. 
1000
1001         * Modules/mediasource/SourceBuffer.cpp:
1002         (WebCore::SourceBuffer::setTimestampOffset):
1003
1004 2013-09-18  Anders Carlsson  <andersca@apple.com>
1005
1006         RefPtrHashMap should work with move only types
1007         https://bugs.webkit.org/show_bug.cgi?id=121564
1008
1009         Reviewed by Andreas Kling.
1010
1011         * bridge/IdentifierRep.cpp:
1012         (WebCore::IdentifierRep::get):
1013         * page/PageGroup.cpp:
1014         (WebCore::PageGroup::transientLocalStorage):
1015
1016 2013-09-18  Enrica Casucci  <enrica@apple.com>
1017
1018         Upstream changes to WebHTMLConverter to support HTML
1019         to NSAttributedString conversion on both iOS and OS X.
1020
1021         Reviewed by Benjamin Poulain.
1022
1023         This is a new submission of r156001 with the fix for the
1024         failing TestWebKitAPI test. The additional change has been
1025         reviewed by Tim Horton.
1026         
1027         * platform/mac/HTMLConverter.h:
1028         * platform/mac/HTMLConverter.mm:
1029         (WebDefaultFont):
1030         (_fontForNameAndSize):
1031         (+[WebHTMLConverter defaultParagraphStyle]):
1032         (-[WebHTMLConverter _computedStyleForElement:]):
1033         (-[WebHTMLConverter _specifiedStyleForElement:]):
1034         (-[WebHTMLConverter _computedStringForNode:property:]):
1035         (-[WebHTMLConverter _stringForNode:property:]):
1036         (-[WebHTMLConverter _getComputedFloat:forNode:property:]):
1037         (-[WebHTMLConverter _getFloat:forNode:property:]):
1038         (_NSFirstPathForDirectoriesInDomains):
1039         (_NSSystemLibraryPath):
1040         (-[WebHTMLConverter _webKitBundle]):
1041         (_colorForRGBColor):
1042         (_shadowForShadowStyle):
1043         (-[WebHTMLConverter _elementIsBlockLevel:]):
1044         (-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
1045         (-[WebHTMLConverter _computedColorForNode:property:]):
1046         (-[WebHTMLConverter _colorForNode:property:]):
1047         (-[WebHTMLConverter _computedAttributesForElement:]):
1048         (-[WebHTMLConverter _attributesForElement:]):
1049         (-[WebHTMLConverter _newParagraphForElement:tag:allowEmpty:suppressTrailingSpace:]):
1050         (-[WebHTMLConverter _newLineForElement:]):
1051         (-[WebHTMLConverter _newTabForElement:]):
1052         (-[WebHTMLConverter _WebMessageDocumentClass]):
1053         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1054         (-[WebHTMLConverter _addQuoteForElement:opening:level:]):
1055         (-[WebHTMLConverter _addValue:forElement:]):
1056         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
1057         (_dateForString):
1058         (_colCompare):
1059         (-[WebHTMLConverter _processMetaElementWithName:content:]):
1060         (-[WebHTMLConverter _processHeadElement:]):
1061         (-[WebHTMLConverter _enterElement:tag:display:embedded:]):
1062         (-[WebHTMLConverter _addTableForElement:]):
1063         (-[WebHTMLConverter _addTableCellForElement:]):
1064         (-[WebHTMLConverter _processElement:tag:display:depth:]):
1065         (-[WebHTMLConverter _addMarkersToList:range:]):
1066         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
1067         (-[WebHTMLConverter _processText:]):
1068         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
1069         (-[WebHTMLConverter _traverseFooterNode:depth:]):
1070         (-[WebHTMLConverter _loadFromDOMRange]):
1071         (-[WebHTMLConverter dealloc]):
1072         (-[WebHTMLConverter init]):
1073         (-[WebHTMLConverter initWithDOMRange:]):
1074         (-[WebHTMLConverter attributedString]):
1075         (+[WebHTMLConverter editingAttributedStringFromRange:]):
1076
1077 2013-09-18  Antti Koivisto  <antti@apple.com>
1078
1079         Rename RenderBR to RenderLineBreak
1080         https://bugs.webkit.org/show_bug.cgi?id=121560
1081
1082         Reviewed by Sam Weinig.
1083
1084         It now represents both hard (br) and soft (wbr) line breaks.
1085
1086 2013-09-18  Robert Hogan  <robert@webkit.org>
1087
1088         Quirksmode: Break Tag Extra Space Bug
1089         https://bugs.webkit.org/show_bug.cgi?id=11943
1090
1091         Reviewed by David Hyatt.
1092
1093         Collapse away all space between text and a hard line-break when in a right-aligned
1094         container so that the trailing space doesn't push the text away from the container edge.
1095
1096         Test: fast/text/whitespace/trailing-space-before-br-in-right-aligned-text.html
1097
1098         * rendering/RenderBlockLineLayout.cpp:
1099         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
1100
1101 2013-09-18  Jer Noble  <jer.noble@apple.com>
1102
1103         Unreviewed build fix for Qt (and other) ports after 156049.
1104
1105         Wrap implementation of PublicURLManager in ENABLE(BLOB) check.
1106
1107         * html/PublicURLManager.cpp:
1108
1109 2013-09-18  Jer Noble  <jer.noble@apple.com>
1110
1111         Merge blink MediaSource changes since fork.
1112         https://bugs.webkit.org/show_bug.cgi?id=118752
1113
1114         Rubber-stamped by Eric Carlson.
1115
1116         Tests: http/tests/media/media-source/mediasource-addsourcebuffer.html
1117                http/tests/media/media-source/mediasource-append-buffer.html
1118                http/tests/media/media-source/mediasource-buffered.html
1119                http/tests/media/media-source/mediasource-closed.html
1120                http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html
1121                http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html
1122                http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html
1123                http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html
1124                http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html
1125                http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html
1126                http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html
1127                http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html
1128                http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html
1129                http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html
1130                http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html
1131                http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html
1132                http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html
1133                http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html
1134                http/tests/media/media-source/mediasource-is-type-supported.html
1135                http/tests/media/media-source/mediasource-multiple-attach.html
1136                http/tests/media/media-source/mediasource-play.html
1137                http/tests/media/media-source/mediasource-sourcebufferlist.html
1138
1139         Add files to project. Fix compile errors exposed by enabling.
1140
1141         * WebCore.xcodeproj/project.pbxproj:
1142         * Modules/mediasource/MediaSourceRegistry.cpp:
1143         (WebCore::MediaSourceRegistry::lookupMediaSource):
1144         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1145         (WebCore::MediaPlayerPrivateAVFoundation::load):
1146         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1147         (WebCore::MediaPlayerPrivateQTKit::load):
1148         * platform/mac/MIMETypeRegistryMac.mm:
1149         (WebCore::MIMETypeRegistry::isSupportedMediaSourceMIMEType):
1150         * CMakeLists.txt:
1151         * DerivedSources.make:
1152         * DerivedSources.pri:
1153         * GNUmakefile.list.am:
1154
1155         Merge
1156         https://chromium.googlesource.com/chromium/blink/+/c38e2955db98a300a535b692869fea0e41501497
1157         https://chromium.googlesource.com/chromium/blink/+/8568015e9bee1de7fccee28163f9e4a4b51f9baf
1158         https://chromium.googlesource.com/chromium/blink/+/14417e8fa6294f4e7dbc1e0fac549398522b2f97
1159         https://chromium.googlesource.com/chromium/blink/+/f43a5496f233102f8861a067a9cf8053c010d401
1160         https://chromium.googlesource.com/chromium/blink/+/57771439806f7c6e6a272efb1ea72900f5f6a015
1161         https://chromium.googlesource.com/chromium/blink/+/8c77a790a9d225194db0a8832399d0f9e1fa54ec
1162         https://chromium.googlesource.com/chromium/blink/+/d33ae3fa7a8592e946503ed17f862a27c6d9dde1
1163         https://chromium.googlesource.com/chromium/blink/+/1caaa9c51f06e1b9341d58c994f77fd59fcd236d
1164         https://chromium.googlesource.com/chromium/blink/+/e95720393b0ebe67f19de39bb77cdf2926165512
1165         https://chromium.googlesource.com/chromium/blink/+/bad2c1b4b70faec731b2ad3cc8a4ccf28de6cc38
1166         https://chromium.googlesource.com/chromium/blink/+/a7873430c3d5c9373336c6f3993db3cb4228e9cd
1167         https://chromium.googlesource.com/chromium/blink/+/508966d5e32360b3cec058f9fbae0014542fbc52
1168         https://chromium.googlesource.com/chromium/blink/+/371dfe72f61ce6f73e6c242324da73c415d38be3
1169
1170 2013-09-18  Andreas Kling  <akling@apple.com>
1171
1172         CTTE: RenderBR always has an HTMLElement.
1173         <https://webkit.org/b/121557>
1174
1175         Reviewed by Antti Koivisto.
1176
1177         This renderer is never anonymous and always has a corresponding HTMLElement.
1178         Tighten this up by making the constructor take a HTMLElement& and remove
1179         RenderBR::createAnonymous().
1180
1181 2013-09-18  Andreas Kling  <akling@apple.com>
1182
1183         Avoid using RenderBR internally in RenderMenuList.
1184         <https://webkit.org/b/121550>
1185
1186         Reviewed by Antti Koivisto.
1187
1188         RenderMenuLists with an empty caption text were previously using a
1189         RenderBR as placeholder.
1190
1191         Switch to using a \n RenderText instead so we can tighten RenderBR.
1192
1193         This will change DRT dumps but actual metrics should not change.
1194
1195 2013-09-18  Antti Koivisto  <antti@apple.com>
1196
1197         Change one accidental "object->isText() || object->isLineBreak()" from previous patch back to "object->isTextOrLineBreak()"
1198         
1199         Not reviewed.
1200
1201         * rendering/InlineIterator.h:
1202         (WebCore::isIteratorTarget):
1203
1204 2013-09-18  Antti Koivisto  <antti@apple.com>
1205
1206         Remove RenderWordBreak
1207         https://bugs.webkit.org/show_bug.cgi?id=121549
1208
1209         Reviewed by Andreas Kling.
1210
1211         Remove RenderWordBreak and make it a bit in RenderBR instead.
1212         
1213         * CMakeLists.txt:
1214         * GNUmakefile.list.am:
1215         * Target.pri:
1216         * WebCore.vcxproj/WebCore.vcxproj:
1217         * WebCore.xcodeproj/project.pbxproj:
1218         * dom/Document.cpp:
1219         (WebCore::Document::updateHoverActiveState):
1220         * dom/Position.cpp:
1221         (WebCore::hasInlineBoxWrapper):
1222         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
1223         * editing/Editor.cpp:
1224         (WebCore::findFirstMarkable):
1225         * editing/TextIterator.cpp:
1226         (WebCore::ignoresContainerClip):
1227         * html/HTMLElement.cpp:
1228         (WebCore::HTMLElement::createRenderer):
1229         * rendering/InlineBox.cpp:
1230         (WebCore::InlineBox::logicalHeight):
1231         (WebCore::InlineBox::baselinePosition):
1232         (WebCore::InlineBox::lineHeight):
1233         (WebCore::InlineBox::deleteLine):
1234         (WebCore::InlineBox::extractLine):
1235         (WebCore::InlineBox::attachLine):
1236         (WebCore::InlineBox::nodeAtPoint):
1237         * rendering/InlineBox.h:
1238         (WebCore::InlineBox::isLineBreak):
1239         * rendering/InlineFlowBox.cpp:
1240         (WebCore::InlineFlowBox::addToLine):
1241         (WebCore::InlineFlowBox::computeOverflow):
1242         * rendering/InlineIterator.h:
1243         (WebCore::InlineIterator::atTextParagraphSeparator):
1244         (WebCore::isIteratorTarget):
1245         * rendering/RenderBR.cpp:
1246         (WebCore::RenderBR::RenderBR):
1247         * rendering/RenderBR.h:
1248         (WebCore::toRenderBR):
1249     
1250             RenderBR now represents both hard and soft line breaks. It will be renamed to RenderLineBreak later.
1251
1252         * rendering/RenderBlock.cpp:
1253         (WebCore::InlineMinMaxIterator::next):
1254         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1255         * rendering/RenderBlockLineLayout.cpp:
1256         (WebCore::createInlineBoxForRenderer):
1257         (WebCore::dirtyLineBoxesForRenderer):
1258         (WebCore::RenderBlock::computeBlockDirectionPositionsForLine):
1259         (WebCore::RenderBlockFlow::layoutInlineChildren):
1260         (WebCore::textBeginsWithBreakablePosition):
1261         (WebCore::canBreakAtThisPosition):
1262         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
1263         * rendering/RenderInline.cpp:
1264         (WebCore::RenderInline::generateCulledLineBoxRects):
1265         (WebCore::RenderInline::culledInlineFirstLineBox):
1266         (WebCore::RenderInline::culledInlineLastLineBox):
1267         (WebCore::RenderInline::dirtyLineBoxes):
1268         * rendering/RenderLineBoxList.cpp:
1269         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
1270         * rendering/RenderObject.h:
1271         (WebCore::RenderObject::isLineBreak):
1272         
1273             This bit covers both BR and WBR.
1274
1275         (WebCore::RenderObject::isBR):
1276         (WebCore::RenderObject::isLineBreakOpportunity):
1277         
1278             Rename isWordBreak to isLineBreakOpportunity. This matches HTML5 spec terminology.
1279
1280         (WebCore::RenderObject::isTextOrLineBreak):
1281         
1282             Since WBR used to be Text we want this check to still cover it too. Renamed from isTextOrBR.
1283
1284         (WebCore::RenderObject::setIsLineBreak):
1285         (WebCore::RenderObject::isWBR):
1286         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
1287         * rendering/RenderObjectChildList.cpp:
1288         (WebCore::RenderObjectChildList::removeChildNode):
1289         * rendering/RenderText.cpp:
1290         * rendering/RenderText.h:
1291         * rendering/RenderTreeAsText.cpp:
1292         (WebCore::RenderTreeAsText::writeRenderObject):
1293         * rendering/RenderWordBreak.cpp: Removed.
1294         * rendering/RenderWordBreak.h: Removed.
1295         * rendering/RenderingAllInOne.cpp:
1296         * rendering/RootInlineBox.cpp:
1297         (WebCore::RootInlineBox::ascentAndDescentForBox):
1298         (WebCore::RootInlineBox::verticalPositionForBox):
1299         (WebCore::RootInlineBox::includeLeadingForBox):
1300         (WebCore::RootInlineBox::includeFontForBox):
1301         (WebCore::RootInlineBox::includeGlyphsForBox):
1302         (WebCore::RootInlineBox::includeMarginForBox):
1303
1304 2013-09-18  Csaba Osztrogonác  <ossy@webkit.org>
1305
1306         ASSERT_NOT_REACHED is touched in WebCore::CSSPrimitiveValue::computeLengthDouble
1307         https://bugs.webkit.org/show_bug.cgi?id=120469
1308
1309         Tests: fast/css/outline-offset-parsing-assert.html
1310                fast/css/outline-offset-parsing.html
1311
1312         Reviewed by Dirk Schulze.
1313
1314         * css/CSSParser.cpp:
1315         (WebCore::CSSParser::parseValue): Fixed a typo after r66615, outline-offset can't be percentage.
1316
1317 2013-09-18  Gurpreet Kaur  <k.gurpreet@samsung.com>
1318
1319         [MathML] Implement the subscriptshift and superscriptshift attributes
1320         https://bugs.webkit.org/show_bug.cgi?id=120069
1321
1322         Reviewed by Darin Adler.
1323
1324         Added support for subscriptshift and superscriptshift attributes. The
1325         subscriptshift attribute is for msup element and superscriptshift for
1326         msup. msubsup can have both subscriptshift and superscriptshift. The
1327         subscriptshift attribute specifies the minimum amount to shift the
1328         baseline of subscript down. The superscriptshift attribute specifies
1329         the minimum amount to shift the baseline of superscript up.
1330
1331         Tests: mathml/presentation/msub-subscriptshift.html
1332                mathml/presentation/msubsup-subscriptshift.html
1333                mathml/presentation/msubsup-superscriptshift.html
1334                mathml/presentation/msup-superscriptshift.html
1335                mathml/presentation/multiscript-subscriptshift.html
1336                mathml/presentation/multiscript-superscriptshift.html
1337
1338         * mathml/mathattrs.in:
1339         * rendering/mathml/RenderMathMLScripts.cpp:
1340         (WebCore::RenderMathMLScripts::layout):
1341         For aligning the subscript and superscript padding is added to the base.
1342         So subscriptshift and superscriptshift attributes is set as padding bottom
1343         and padding top of base respectively.
1344
1345 2013-09-18  Mario Sanchez Prada  <mario.prada@samsung.com>
1346
1347         [ATK] Expose aria-haspopup and aria-sort without the 'aria-' prefix
1348         https://bugs.webkit.org/show_bug.cgi?id=121495
1349
1350         Reviewed by Chris Fleizach.
1351
1352         Removed the 'aria-' prefix from the exposed ATK object attributes
1353         for WAI-ARIA attributes 'aria-haspopup' and 'aria-sort'.
1354
1355         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1356         (webkitAccessibleGetAttributes): Removed the prefix.
1357
1358 2013-09-17  Antti Koivisto  <antti@apple.com>
1359
1360         Rename InlineBox::isText()
1361         <https://webkit.org/b/121525>
1362
1363         Reviewed by Andreas Kling.
1364
1365         The flag sounds like RenderObject::isText() yet it can be set for some inline boxes generated
1366         for non-text renderers too (br, list markers). This is pretty confusing.
1367         
1368         Rename to InlineBox::behavesLikeText().
1369
1370         * rendering/InlineBox.cpp:
1371         (WebCore::InlineBox::logicalHeight):
1372         (WebCore::InlineBox::baselinePosition):
1373         (WebCore::InlineBox::lineHeight):
1374         * rendering/InlineBox.h:
1375         (WebCore::InlineBox::behavesLikeText):
1376         (WebCore::InlineBox::setBehavesLikeText):
1377         (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
1378         * rendering/InlineFlowBox.cpp:
1379         (WebCore::InlineFlowBox::addToLine):
1380         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1381         * rendering/InlineTextBox.cpp:
1382         (WebCore::InlineTextBox::baselinePosition):
1383         (WebCore::InlineTextBox::lineHeight):
1384         * rendering/RenderBlockLineLayout.cpp:
1385         (WebCore::createInlineBoxForRenderer):
1386         (WebCore::setLogicalWidthForTextRun):
1387         * rendering/RenderListMarker.cpp:
1388         (WebCore::RenderListMarker::createInlineBox):
1389         * rendering/RenderText.cpp:
1390         (WebCore::RenderText::createInlineTextBox):
1391         * rendering/RootInlineBox.cpp:
1392         (WebCore::RootInlineBox::includeLeadingForBox):
1393         (WebCore::RootInlineBox::includeFontForBox):
1394         (WebCore::RootInlineBox::includeGlyphsForBox):
1395         (WebCore::RootInlineBox::includeMarginForBox):
1396         
1397             Switch tests from isText() to isTextOrBR(). This matches the behavior before r155957.
1398             I don't know if there is a case where this actually makes any difference in behavior.
1399
1400 2013-09-17  Sam Weinig  <sam@webkit.org>
1401
1402         Shrink SVGPathStringBuilder
1403         https://bugs.webkit.org/show_bug.cgi?id=121536
1404
1405         Reviewed by Anders Carlsson.
1406
1407         - Use StringBuilder everywhere to avoid unnecessary temporary
1408           String objects and code size bloat.
1409         - Also did a drive by FINAL / OVERRIDE pass.
1410
1411         As an example of the win, the function SVGPathStringBuilder::arcTo
1412         went from being 6120 bytes down to just 378 bytes.
1413
1414         * svg/SVGPathStringBuilder.cpp:
1415         (WebCore::SVGPathStringBuilder::SVGPathStringBuilder):
1416         (WebCore::SVGPathStringBuilder::~SVGPathStringBuilder):
1417         (WebCore::SVGPathStringBuilder::cleanup):
1418         (WebCore::SVGPathStringBuilder::incrementPathSegmentCount):
1419         (WebCore::SVGPathStringBuilder::continueConsuming):
1420         It wasn't helpful for these to be inlined, so move them to
1421         the implementation file.
1422
1423         (WebCore::appendFlag):
1424         (WebCore::appendNumber):
1425         (WebCore::appendPoint):
1426         Added helpers.
1427
1428         (WebCore::SVGPathStringBuilder::moveTo):
1429         (WebCore::SVGPathStringBuilder::lineTo):
1430         (WebCore::SVGPathStringBuilder::lineToHorizontal):
1431         (WebCore::SVGPathStringBuilder::lineToVertical):
1432         (WebCore::SVGPathStringBuilder::curveToCubic):
1433         (WebCore::SVGPathStringBuilder::curveToCubicSmooth):
1434         (WebCore::SVGPathStringBuilder::curveToQuadratic):
1435         (WebCore::SVGPathStringBuilder::curveToQuadraticSmooth):
1436         (WebCore::SVGPathStringBuilder::arcTo):
1437         (WebCore::SVGPathStringBuilder::closePath):
1438         * svg/SVGPathStringBuilder.h:
1439         Stopped using operator+ and removed duplicate string building logic in each build
1440         type (e.g. both sides of the PathCoordinateMode condition were doing almost identical
1441         work).
1442
1443 2013-09-17  Sam Weinig  <sam@webkit.org>
1444
1445         CTTE: Convert some straggling Element subclasses constructors to take a Document&
1446         https://bugs.webkit.org/show_bug.cgi?id=121533
1447
1448         Reviewed by Anders Carlsson.
1449
1450         * html/HTMLMeterElement.cpp:
1451         (WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):
1452         * html/HTMLProgressElement.cpp:
1453         (WebCore::HTMLProgressElement::didAddUserAgentShadowRoot):
1454         * html/HTMLTextAreaElement.cpp:
1455         (WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot):
1456         * html/SearchInputType.cpp:
1457         (WebCore::SearchInputType::createShadowSubtree):
1458         * html/TextFieldInputType.cpp:
1459         (WebCore::TextFieldInputType::createShadowSubtree):
1460         * html/shadow/MeterShadowElement.cpp:
1461         (WebCore::MeterShadowElement::MeterShadowElement):
1462         (WebCore::MeterInnerElement::MeterInnerElement):
1463         * html/shadow/MeterShadowElement.h:
1464         (WebCore::MeterInnerElement::create):
1465         (WebCore::MeterBarElement::create):
1466         (WebCore::MeterValueElement::create):
1467         * html/shadow/ProgressShadowElement.cpp:
1468         (WebCore::ProgressShadowElement::ProgressShadowElement):
1469         (WebCore::ProgressInnerElement::ProgressInnerElement):
1470         (WebCore::ProgressBarElement::ProgressBarElement):
1471         (WebCore::ProgressValueElement::ProgressValueElement):
1472         * html/shadow/ProgressShadowElement.h:
1473         (WebCore::ProgressInnerElement::create):
1474         (WebCore::ProgressBarElement::create):
1475         (WebCore::ProgressValueElement::create):
1476         * html/shadow/SpinButtonElement.cpp:
1477         (WebCore::SpinButtonElement::SpinButtonElement):
1478         (WebCore::SpinButtonElement::create):
1479         * html/shadow/SpinButtonElement.h:
1480         * html/shadow/TextControlInnerElements.cpp:
1481         (WebCore::TextControlInnerContainer::TextControlInnerContainer):
1482         (WebCore::TextControlInnerContainer::create):
1483         (WebCore::TextControlInnerElement::TextControlInnerElement):
1484         (WebCore::TextControlInnerElement::create):
1485         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
1486         (WebCore::TextControlInnerTextElement::create):
1487         (WebCore::SearchFieldResultsButtonElement::SearchFieldResultsButtonElement):
1488         (WebCore::SearchFieldResultsButtonElement::create):
1489         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement):
1490         (WebCore::SearchFieldCancelButtonElement::create):
1491         (WebCore::InputFieldSpeechButtonElement::InputFieldSpeechButtonElement):
1492         (WebCore::InputFieldSpeechButtonElement::create):
1493         * html/shadow/TextControlInnerElements.h:
1494
1495 2013-09-17  Zoltan Horvath  <zoltan@webkit.org>
1496
1497         [CSS Shapes] Use the float height to determine position in shape-inside
1498         https://bugs.webkit.org/show_bug.cgi?id=102846
1499
1500         Reviewed by Darin Adler.
1501
1502         Float positioning inside shape-inside has been working only for simple cases when the float boundaries didn't overlap with the shape.
1503         This patch fixes the behavior for left floats and shapes with inline content. I want to add this work step by step, therefore the next
1504         step would be to add support for block content with inline content (e.g. paragraphs) then cover cases with right floats.
1505
1506         Tests: fast/shapes/shape-inside/shape-inside-left-float-in-lower-left-triangle-inline-content.html
1507                fast/shapes/shape-inside/shape-inside-left-float-in-lower-right-triangle-inline-content.html
1508                fast/shapes/shape-inside/shape-inside-left-float-in-upper-left-triangle-inline-content.html
1509                fast/shapes/shape-inside/shape-inside-left-float-in-upper-right-triangle-inline-content.html
1510
1511         * rendering/LineWidth.cpp:
1512         (WebCore::LineWidth::LineWidth): Use the new updateCurrentShapeSegment member function.
1513         (WebCore::LineWidth::updateCurrentShapeSegment): We need a function to update the current line segment's reference, since we use it multiple places.
1514         * rendering/LineWidth.h: Add new member function.
1515         * rendering/RenderBlock.cpp:
1516         (WebCore::RenderBlock::computeLogicalLocationForFloat): Fix positioning of a floating element.
1517         * rendering/RenderBlockLineLayout.cpp:
1518         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Use updateSegmentsForLine instead of computeSegmentsForLine.
1519         (WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Use updateSegmentsForLine instead of computeSegmentsForLine.
1520         (WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded):
1521         (WebCore::updateSegmentsForShapes): After our float is positioned, we need to adjust the current lineTop and update the logical height to be able to wrap around the float.
1522         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): If we have a float in our line we might need to adjust our lineTop and logicalHeight.
1523         * rendering/shapes/ShapeInfo.cpp:
1524         (WebCore::::computeSegmentsForLine): Add new const function to compute the segments. I'd like make this function static later if possible.
1525         (WebCore::::updateSegmentsForLine): Old computeSegmentsForLine, change name to indicate that it is actually changing things.
1526         * rendering/shapes/ShapeInfo.h: Update function names, add declaration.
1527         (WebCore::ShapeInfo::clearSegments):
1528         (WebCore::ShapeInfo::logicalLineBottom):
1529         (WebCore::ShapeInfo::lineOverlapsShapeBounds):
1530         * rendering/shapes/ShapeInsideInfo.cpp:
1531         (WebCore::ShapeInsideInfo::computeFirstFitPositionForFloat): Compute the first fit position below the current line position inside shapes. I called this function
1532         this way, because currently we use it only for shapes.
1533         * rendering/shapes/ShapeInsideInfo.h: Update function names.
1534         * rendering/shapes/ShapeOutsideInfo.cpp: Update function names.
1535         (WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
1536         (WebCore::ShapeOutsideInfo::updateSegmentsForLine):
1537         * rendering/shapes/ShapeOutsideInfo.h: Update function names.
1538
1539 2013-09-17  Sam Weinig  <sam@webkit.org>
1540
1541         Replace use of OwnArrayPtr<Foo> with std::unique_ptr<Foo[]> in WebCore
1542         https://bugs.webkit.org/show_bug.cgi?id=121527
1543
1544         Reviewed by Anders Carlsson.
1545
1546         * Modules/webaudio/AudioBufferSourceNode.cpp:
1547         (WebCore::AudioBufferSourceNode::setBuffer):
1548         * Modules/webaudio/AudioBufferSourceNode.h:
1549         * Modules/webaudio/OscillatorNode.h:
1550         * css/CSSParser.cpp:
1551         (WebCore::CSSParser::setupParser):
1552         (WebCore::CSSParser::currentCharacter16):
1553         * css/CSSParser.h:
1554         * html/HTMLAreaElement.h:
1555         * html/HTMLFrameSetElement.h:
1556         * html/canvas/WebGLRenderingContext.cpp:
1557         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
1558         (WebCore::WebGLRenderingContext::simulateVertexAttrib0):
1559         (WebCore::WebGLRenderingContext::LRUImageBufferCache::LRUImageBufferCache):
1560         * html/canvas/WebGLRenderingContext.h:
1561         * platform/ScrollAnimatorNone.cpp:
1562         * platform/audio/DynamicsCompressor.cpp:
1563         (WebCore::DynamicsCompressor::setNumberOfChannels):
1564         * platform/audio/DynamicsCompressor.h:
1565         * platform/audio/FFTFrame.h:
1566         * platform/audio/gstreamer/FFTFrameGStreamer.cpp:
1567         (WebCore::FFTFrame::FFTFrame):
1568         * platform/efl/ScrollbarEfl.cpp:
1569         (ScrollbarEfl::updateThumbPositionAndProportion):
1570         * platform/graphics/ANGLEWebKitBridge.cpp:
1571         (WebCore::ANGLEWebKitBridge::compileShaderSource):
1572         * platform/graphics/GraphicsContext3D.cpp:
1573         (WebCore::GraphicsContext3D::texImage2DResourceSafe):
1574         * platform/graphics/GraphicsContext3D.h:
1575         * platform/graphics/GraphicsContext3DPrivate.cpp:
1576         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1577         * platform/graphics/blackberry/LayerTexture.cpp:
1578         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1579         (WebCore::getDirtyRects):
1580         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1581         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1582         * platform/graphics/cg/GraphicsContextCG.cpp:
1583         * platform/graphics/cg/ImageBufferCG.cpp:
1584         * platform/graphics/gpu/Texture.cpp:
1585         (WebCore::Texture::updateSubRect):
1586         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1587         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
1588         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
1589         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
1590         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1591         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
1592         (WebCore::GraphicsContext3D::compileShader):
1593         (WebCore::GraphicsContext3D::getActiveAttrib):
1594         (WebCore::GraphicsContext3D::getActiveUniform):
1595         (WebCore::GraphicsContext3D::getProgramInfoLog):
1596         (WebCore::GraphicsContext3D::getShaderInfoLog):
1597         * platform/graphics/opentype/OpenTypeSanitizer.cpp:
1598         * platform/graphics/texmap/TextureMapperGL.cpp:
1599         * platform/graphics/wince/SharedBitmap.cpp:
1600         (WebCore::SharedBitmap::SharedBitmap):
1601         (WebCore::SharedBitmap::to16bit):
1602         * platform/graphics/wince/SharedBitmap.h:
1603         * platform/image-decoders/blackberry/JPEGImageDecoder.cpp:
1604         (WebCore::ImageReader::decode):
1605         * platform/image-decoders/png/PNGImageDecoder.cpp:
1606         (WebCore::PNGImageReader::createRowBuffer):
1607         * platform/win/ContextMenuWin.cpp:
1608         (WebCore::ContextMenu::getContextMenuItems):
1609         * platform/win/LoggingWin.cpp:
1610         (WebCore::logLevelString):
1611         * plugins/PluginPackage.cpp:
1612         * plugins/blackberry/PluginViewBlackBerry.cpp:
1613         (WebCore::PluginView::handleTouchEvent):
1614         * plugins/win/PluginPackageWin.cpp:
1615         (WebCore::PluginPackage::fetchInfo):
1616
1617 2013-09-17  Commit Queue  <commit-queue@webkit.org>
1618
1619         Unreviewed, rolling out r156001.
1620         http://trac.webkit.org/changeset/156001
1621         https://bugs.webkit.org/show_bug.cgi?id=121529
1622
1623         Broke API tests (Requested by ap on #webkit).
1624
1625         * platform/mac/HTMLConverter.h:
1626         * platform/mac/HTMLConverter.mm:
1627         (WebDefaultFont):
1628         (_fontForNameAndSize):
1629         (+[WebHTMLConverter defaultParagraphStyle]):
1630         (-[WebHTMLConverter _computedStyleForElement:]):
1631         (-[WebHTMLConverter _specifiedStyleForElement:]):
1632         (-[WebHTMLConverter _computedStringForNode:property:]):
1633         (-[WebHTMLConverter _stringForNode:property:]):
1634         (-[WebHTMLConverter _getComputedFloat:forNode:property:]):
1635         (-[WebHTMLConverter _getFloat:forNode:property:]):
1636         (_colorForRGBColor):
1637         (_shadowForShadowStyle):
1638         (-[WebHTMLConverter _elementIsBlockLevel:]):
1639         (-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
1640         (-[WebHTMLConverter _computedColorForNode:property:]):
1641         (-[WebHTMLConverter _colorForNode:property:]):
1642         (-[WebHTMLConverter _computedAttributesForElement:]):
1643         (-[WebHTMLConverter _attributesForElement:]):
1644         (-[WebHTMLConverter _newParagraphForElement:tag:allowEmpty:suppressTrailingSpace:]):
1645         (-[WebHTMLConverter _newLineForElement:]):
1646         (-[WebHTMLConverter _newTabForElement:]):
1647         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1648         (-[WebHTMLConverter _addQuoteForElement:opening:level:]):
1649         (-[WebHTMLConverter _addValue:forElement:]):
1650         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
1651         (_dateForString):
1652         (_colCompare):
1653         (-[WebHTMLConverter _enterElement:tag:display:]):
1654         (-[WebHTMLConverter _addTableForElement:]):
1655         (-[WebHTMLConverter _addTableCellForElement:]):
1656         (-[WebHTMLConverter _processElement:tag:display:depth:]):
1657         (-[WebHTMLConverter _addMarkersToList:range:]):
1658         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
1659         (-[WebHTMLConverter _processText:]):
1660         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
1661         (-[WebHTMLConverter _traverseFooterNode:depth:]):
1662         (-[WebHTMLConverter _loadFromDOMRange]):
1663         (-[WebHTMLConverter dealloc]):
1664         (-[WebHTMLConverter init]):
1665         (-[WebHTMLConverter initWithDOMRange:]):
1666         (-[WebHTMLConverter attributedString]):
1667         (+[WebHTMLConverter editingAttributedStringFromRange:]):
1668         (fileWrapperForElement):
1669
1670 2013-09-17  Samuel White  <samuel_white@apple.com>
1671
1672         AX: Mac AXARIABusy should be AXElementBusy (not ARIA specific)
1673         https://bugs.webkit.org/show_bug.cgi?id=121442
1674
1675         Reviewed by Chris Fleizach.
1676
1677         No new tests, changed AXARIABusy attribute to AXElementBusy to uncouple the concept of busy with
1678         the aria-busy attribute. This will allow us to expand on the definition of busy moving forward.
1679
1680         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1681         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1682         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1683
1684 2013-09-17  Andreas Kling  <akling@apple.com>
1685
1686         Pack create_hash_table tables better.
1687         <https://webkit.org/b/121517>
1688
1689         Reviewed by Sam Weinig.
1690
1691         Reduces WebCore binary size by 72744 bytes.
1692
1693         * bindings/scripts/CodeGeneratorJS.pm:
1694         (GenerateHashTable):
1695
1696             Updated for new HashTableValue member order.
1697
1698         * bindings/scripts/test/JS/*:
1699
1700             Rebaselined bindings tests.
1701
1702 2013-09-17  Zoltan Horvath  <zoltan@webkit.org>
1703
1704         [Qt] Add FlowThreadController.h to Target.pri
1705         https://bugs.webkit.org/show_bug.cgi?id=121516
1706
1707         Reviewed by Dirk Schulze.
1708
1709         No new tests, no behavior change.
1710
1711         * Target.pri:
1712
1713 2013-09-17  Anders Carlsson  <andersca@apple.com>
1714
1715         Stop explicitly using PassOwnPtr in WebCore/html
1716         https://bugs.webkit.org/show_bug.cgi?id=121511
1717
1718         Reviewed by Andreas Kling.
1719
1720         * dom/ElementRareData.h:
1721         (WebCore::ElementRareData::setClassList):
1722         * html/ButtonInputType.cpp:
1723         (WebCore::ButtonInputType::create):
1724         * html/ButtonInputType.h:
1725         * html/CheckboxInputType.cpp:
1726         (WebCore::CheckboxInputType::create):
1727         (WebCore::CheckboxInputType::willDispatchClick):
1728         * html/CheckboxInputType.h:
1729         * html/ClassList.cpp:
1730         (WebCore::ClassList::create):
1731         * html/ClassList.h:
1732         * html/ColorInputType.cpp:
1733         (WebCore::ColorInputType::create):
1734         * html/ColorInputType.h:
1735         * html/DateInputType.cpp:
1736         (WebCore::DateInputType::create):
1737         * html/DateInputType.h:
1738         * html/DateTimeInputType.cpp:
1739         (WebCore::DateTimeInputType::create):
1740         * html/DateTimeInputType.h:
1741         * html/DateTimeLocalInputType.cpp:
1742         (WebCore::DateTimeLocalInputType::create):
1743         * html/DateTimeLocalInputType.h:
1744         * html/EmailInputType.cpp:
1745         (WebCore::EmailInputType::create):
1746         * html/EmailInputType.h:
1747         * html/FileInputType.cpp:
1748         (WebCore::FileInputType::create):
1749         * html/FileInputType.h:
1750         * html/FormAssociatedElement.cpp:
1751         (WebCore::FormAttributeTargetObserver::create):
1752         * html/FormController.cpp:
1753         (WebCore::SavedFormState::create):
1754         (WebCore::SavedFormState::deserialize):
1755         (WebCore::FormKeyGenerator::create):
1756         (WebCore::FormController::createSavedFormStateMap):
1757         * html/FormController.h:
1758         (WebCore::FormController::create):
1759         * html/HTMLInputElement.cpp:
1760         (WebCore::ListAttributeTargetObserver::create):
1761         * html/HiddenInputType.cpp:
1762         (WebCore::HiddenInputType::create):
1763         * html/HiddenInputType.h:
1764         * html/ImageInputType.cpp:
1765         (WebCore::ImageInputType::create):
1766         * html/ImageInputType.h:
1767         * html/InputType.cpp:
1768         (WebCore::InputType::create):
1769         (WebCore::InputType::createText):
1770         (WebCore::InputType::willDispatchClick):
1771         * html/InputType.h:
1772         * html/MonthInputType.cpp:
1773         (WebCore::MonthInputType::create):
1774         * html/MonthInputType.h:
1775         * html/NumberInputType.cpp:
1776         (WebCore::NumberInputType::create):
1777         * html/NumberInputType.h:
1778         * html/PasswordInputType.cpp:
1779         (WebCore::PasswordInputType::create):
1780         * html/PasswordInputType.h:
1781         * html/PublicURLManager.h:
1782         (WebCore::PublicURLManager::create):
1783         * html/RadioInputType.cpp:
1784         (WebCore::RadioInputType::create):
1785         (WebCore::RadioInputType::willDispatchClick):
1786         * html/RadioInputType.h:
1787         * html/RangeInputType.cpp:
1788         (WebCore::RangeInputType::create):
1789         * html/RangeInputType.h:
1790         * html/ResetInputType.cpp:
1791         (WebCore::ResetInputType::create):
1792         * html/ResetInputType.h:
1793         * html/SearchInputType.cpp:
1794         (WebCore::SearchInputType::create):
1795         * html/SearchInputType.h:
1796         * html/SubmitInputType.cpp:
1797         (WebCore::SubmitInputType::create):
1798         * html/SubmitInputType.h:
1799         * html/TelephoneInputType.cpp:
1800         (WebCore::TelephoneInputType::create):
1801         * html/TelephoneInputType.h:
1802         * html/TextInputType.cpp:
1803         (WebCore::TextInputType::create):
1804         * html/TextInputType.h:
1805         * html/TimeInputType.cpp:
1806         (WebCore::TimeInputType::create):
1807         * html/TimeInputType.h:
1808         * html/URLInputType.cpp:
1809         (WebCore::URLInputType::create):
1810         * html/URLInputType.h:
1811         * html/ValidationMessage.cpp:
1812         (WebCore::ValidationMessage::create):
1813         * html/ValidationMessage.h:
1814         * html/ValidityState.h:
1815         (WebCore::ValidityState::create):
1816         * html/WeekInputType.cpp:
1817         (WebCore::WeekInputType::create):
1818         * html/WeekInputType.h:
1819         * html/canvas/CanvasRenderingContext2D.cpp:
1820         (WebCore::CanvasRenderingContext2D::createCompositingBuffer):
1821         * html/canvas/CanvasRenderingContext2D.h:
1822         (WebCore::CanvasRenderingContext2D::create):
1823         * html/canvas/EXTDrawBuffers.cpp:
1824         (WebCore::EXTDrawBuffers::create):
1825         * html/canvas/EXTDrawBuffers.h:
1826         * html/canvas/EXTTextureFilterAnisotropic.cpp:
1827         (WebCore::EXTTextureFilterAnisotropic::create):
1828         * html/canvas/EXTTextureFilterAnisotropic.h:
1829         * html/canvas/OESElementIndexUint.cpp:
1830         (WebCore::OESElementIndexUint::create):
1831         * html/canvas/OESElementIndexUint.h:
1832         * html/canvas/OESStandardDerivatives.cpp:
1833         (WebCore::OESStandardDerivatives::create):
1834         * html/canvas/OESStandardDerivatives.h:
1835         * html/canvas/OESTextureFloat.cpp:
1836         (WebCore::OESTextureFloat::create):
1837         * html/canvas/OESTextureFloat.h:
1838         * html/canvas/OESTextureHalfFloat.cpp:
1839         (WebCore::OESTextureHalfFloat::create):
1840         * html/canvas/OESTextureHalfFloat.h:
1841         * html/canvas/OESVertexArrayObject.cpp:
1842         (WebCore::OESVertexArrayObject::create):
1843         * html/canvas/OESVertexArrayObject.h:
1844         * html/canvas/WebGLCompressedTextureATC.cpp:
1845         (WebCore::WebGLCompressedTextureATC::create):
1846         * html/canvas/WebGLCompressedTextureATC.h:
1847         * html/canvas/WebGLCompressedTexturePVRTC.cpp:
1848         (WebCore::WebGLCompressedTexturePVRTC::create):
1849         * html/canvas/WebGLCompressedTexturePVRTC.h:
1850         * html/canvas/WebGLCompressedTextureS3TC.cpp:
1851         (WebCore::WebGLCompressedTextureS3TC::create):
1852         * html/canvas/WebGLCompressedTextureS3TC.h:
1853         * html/canvas/WebGLDebugRendererInfo.cpp:
1854         (WebCore::WebGLDebugRendererInfo::create):
1855         * html/canvas/WebGLDebugRendererInfo.h:
1856         * html/canvas/WebGLDebugShaders.cpp:
1857         (WebCore::WebGLDebugShaders::create):
1858         * html/canvas/WebGLDebugShaders.h:
1859         * html/canvas/WebGLDepthTexture.cpp:
1860         (WebCore::WebGLDepthTexture::create):
1861         * html/canvas/WebGLDepthTexture.h:
1862         * html/canvas/WebGLLoseContext.cpp:
1863         (WebCore::WebGLLoseContext::create):
1864         * html/canvas/WebGLLoseContext.h:
1865         * html/canvas/WebGLRenderingContext.cpp:
1866         (WebCore::WebGLRenderingContext::create):
1867         * html/canvas/WebGLRenderingContext.h:
1868         * html/parser/BackgroundHTMLParser.cpp:
1869         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
1870         (WebCore::BackgroundHTMLParser::resumeFrom):
1871         * html/parser/BackgroundHTMLParser.h:
1872         (WebCore::BackgroundHTMLParser::create):
1873         * html/parser/HTMLDocumentParser.cpp:
1874         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
1875         (WebCore::HTMLDocumentParser::validateSpeculations):
1876         (WebCore::HTMLDocumentParser::discardSpeculationsAndResumeFrom):
1877         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
1878         * html/parser/HTMLDocumentParser.h:
1879         * html/parser/HTMLElementStack.cpp:
1880         (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
1881         * html/parser/HTMLElementStack.h:
1882         (WebCore::HTMLElementStack::ElementRecord::releaseNext):
1883         (WebCore::HTMLElementStack::ElementRecord::setNext):
1884         * html/parser/HTMLMetaCharsetParser.h:
1885         (WebCore::HTMLMetaCharsetParser::create):
1886         * html/parser/HTMLParserScheduler.h:
1887         (WebCore::HTMLParserScheduler::create):
1888         * html/parser/HTMLParserThread.h:
1889         (WebCore::HTMLParserThread::create):
1890         * html/parser/HTMLPreloadScanner.cpp:
1891         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
1892         * html/parser/HTMLResourcePreloader.cpp:
1893         (WebCore::HTMLResourcePreloader::preload):
1894         * html/parser/HTMLResourcePreloader.h:
1895         (WebCore::PreloadRequest::create):
1896         * html/parser/HTMLScriptRunner.h:
1897         (WebCore::HTMLScriptRunner::create):
1898         * html/parser/HTMLToken.h:
1899         (WebCore::HTMLToken::releaseDoctypeData):
1900         * html/parser/HTMLTokenizer.h:
1901         (WebCore::HTMLTokenizer::create):
1902         * html/parser/HTMLTreeBuilder.h:
1903         (WebCore::HTMLTreeBuilder::create):
1904         * html/parser/XSSAuditor.cpp:
1905         (WebCore::XSSAuditor::filterToken):
1906         * html/parser/XSSAuditor.h:
1907         * html/parser/XSSAuditorDelegate.h:
1908         (WebCore::XSSInfo::create):
1909         * html/track/WebVTTParser.h:
1910         (WebCore::WebVTTParser::create):
1911         * html/track/WebVTTTokenizer.h:
1912         (WebCore::WebVTTTokenizer::create):
1913
1914 2013-09-17  Enrica Casucci  <enrica@apple.com>
1915
1916         Upstream changes to WebHTMLConverter to support HTML
1917         to NSAttributedString conversion on both iOS and OS X.
1918
1919         Reviewed by Benjamin Poulain.
1920
1921         * platform/mac/HTMLConverter.h:
1922         * platform/mac/HTMLConverter.mm:
1923         (WebDefaultFont):
1924         (_fontForNameAndSize):
1925         (+[WebHTMLConverter defaultParagraphStyle]):
1926         (-[WebHTMLConverter _computedStyleForElement:]):
1927         (-[WebHTMLConverter _specifiedStyleForElement:]):
1928         (-[WebHTMLConverter _computedStringForNode:property:]):
1929         (-[WebHTMLConverter _stringForNode:property:]):
1930         (-[WebHTMLConverter _getComputedFloat:forNode:property:]):
1931         (-[WebHTMLConverter _getFloat:forNode:property:]):
1932         (_NSFirstPathForDirectoriesInDomains):
1933         (_NSSystemLibraryPath):
1934         (-[WebHTMLConverter _webKitBundle]):
1935         (_colorForRGBColor):
1936         (_shadowForShadowStyle):
1937         (-[WebHTMLConverter _elementIsBlockLevel:]):
1938         (-[WebHTMLConverter _elementHasOwnBackgroundColor:]):
1939         (-[WebHTMLConverter _computedColorForNode:property:]):
1940         (-[WebHTMLConverter _colorForNode:property:]):
1941         (-[WebHTMLConverter _computedAttributesForElement:]):
1942         (-[WebHTMLConverter _attributesForElement:]):
1943         (-[WebHTMLConverter _newParagraphForElement:tag:allowEmpty:suppressTrailingSpace:]):
1944         (-[WebHTMLConverter _newLineForElement:]):
1945         (-[WebHTMLConverter _newTabForElement:]):
1946         (-[WebHTMLConverter _WebMessageDocumentClass]):
1947         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1948         (-[WebHTMLConverter _addQuoteForElement:opening:level:]):
1949         (-[WebHTMLConverter _addValue:forElement:]):
1950         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
1951         (_dateForString):
1952         (_colCompare):
1953         (-[WebHTMLConverter _processMetaElementWithName:content:]):
1954         (-[WebHTMLConverter _processHeadElement:]):
1955         (-[WebHTMLConverter _enterElement:tag:display:embedded:]):
1956         (-[WebHTMLConverter _addTableForElement:]):
1957         (-[WebHTMLConverter _addTableCellForElement:]):
1958         (-[WebHTMLConverter _processElement:tag:display:depth:]):
1959         (-[WebHTMLConverter _addMarkersToList:range:]):
1960         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
1961         (-[WebHTMLConverter _processText:]):
1962         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
1963         (-[WebHTMLConverter _traverseFooterNode:depth:]):
1964         (-[WebHTMLConverter _loadFromDOMRange]):
1965         (-[WebHTMLConverter dealloc]):
1966         (-[WebHTMLConverter init]):
1967         (-[WebHTMLConverter initWithDOMRange:]):
1968         (-[WebHTMLConverter attributedString]):
1969         (+[WebHTMLConverter editingAttributedStringFromRange:]):
1970
1971 2013-09-17  Sam Weinig  <sam@webkit.org>
1972
1973         Add make_unique and start using it
1974         https://bugs.webkit.org/show_bug.cgi?id=121523
1975
1976         Reviewed by Anders Carlsson.
1977
1978         * html/HTMLAreaElement.h:
1979         * html/HTMLFrameSetElement.h:
1980         * platform/Length.cpp:
1981         (WebCore::newCoordsArray):
1982         (WebCore::newLengthArray):
1983         * platform/Length.h:
1984         Switch off OwnArrayPtr to std::unique_ptr<T[]> and make use of make_unique.
1985
1986 2013-09-17  Simon Fraser  <simon.fraser@apple.com>
1987
1988         Hardware accelerated CSS transitions appear pixelated when scaled up using transform
1989         https://bugs.webkit.org/show_bug.cgi?id=27684
1990         <rdar://problem/6134606>
1991
1992         Reviewed by Dean Jackson.
1993         
1994         Take transforms and animations into account when computing the contentsScale
1995         for a layer, so that scaled-up layers remain sharp most of the time.
1996         
1997         In its recursiveCommitChanges() tree walk, GraphicsLayerCA now tracks
1998         a root-relative transform, and extracts from that transform the X and Y
1999         scales which it uses to scale the backing store.
2000         
2001         If the layer has transform animations on it, we keep around
2002         a transformation matrix for the animation endpoints (or keyframes),
2003         pick up the state that has the larger impact on the root-relative scale,
2004         and use that as the layer's transform, and the transform when recursing
2005         over descendants.
2006
2007         Tests: compositing/contents-scale/animating.html
2008                compositing/contents-scale/scaled-ancestor.html
2009                compositing/contents-scale/simple-scale.html
2010                compositing/contents-scale/z-translate.html
2011
2012         * platform/graphics/ca/GraphicsLayerCA.cpp:
2013         (WebCore::maxScaleFromTransform): Decompose the transform if necesssary
2014         to extract the X and Y scale components.
2015         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Initialize m_rootRelativeScaleFactor.
2016         (WebCore::GraphicsLayerCA::flushCompositingState): Supply a TransformationMatrix
2017         for the root of the recursion.
2018         (WebCore::GraphicsLayerCA::layerTransform): This code was factored out of
2019         computeVisibleRect(), and optionally takes a custom transform.
2020         (WebCore::GraphicsLayerCA::computeVisibleRect): Use the layerTransform() function.
2021         (WebCore::GraphicsLayerCA::updateRootRelativeScale): Given a transform from the root,
2022         find the max scale factor by multiplying the various animation endpoint matrices and picking
2023         the one with the biggest impact on scale. Use this to set m_rootRelativeScaleFactor, and
2024         set the flag to say that we need to update contentsScale.
2025         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2026         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): After updating
2027         animations, call updateRootRelativeScale() to update m_rootRelativeScaleFactor.
2028         (WebCore::GraphicsLayerCA::updateAnimations): We have a side table of animation name to
2029         TransformationMatrix, so figure out which entries can be removed from that side table,
2030         and remove them.
2031         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
2032         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Store the matrices for
2033         animation endpoints/keyframes in the m_animationTransforms side table. We don't store
2034         them directly in LayerPropertyAnimation because we just want the final matrix for
2035         a transform list, and using a side table makes ownership easier to manage.
2036         (WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact):
2037         goes through the matrices for the running animation endpoints/keyframes, and
2038         multiplies each with the transform up to this layer to find the matrix with the
2039         larger impact on scale.
2040         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints): Returns a vector
2041         of TransformationMatrix for the from and to states.
2042         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes): Returns a vector
2043         of TransformationMatrix for the keyframes.
2044         (WebCore::GraphicsLayerCA::updateContentsScale): Include m_rootRelativeScaleFactor in the
2045         scale factor computation.
2046         (WebCore::GraphicsLayerCA::dumpAdditionalProperties): If we're dumping visible rects,
2047         also dump the contentsScale. Convenient at these are useful to look at together, and I didn't
2048         want to pollute Internals with yet more flags.
2049         * platform/graphics/ca/GraphicsLayerCA.h:
2050         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation): Formatting.
2051
2052 2013-09-17  Commit Queue  <commit-queue@webkit.org>
2053
2054         Unreviewed, rolling out r155977.
2055         http://trac.webkit.org/changeset/155977
2056         https://bugs.webkit.org/show_bug.cgi?id=121515
2057
2058         Broke over a dozen tests on Mac WK2 (Requested by ap on
2059         #webkit).
2060
2061         * platform/graphics/ca/GraphicsLayerCA.cpp:
2062         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2063         (WebCore::GraphicsLayerCA::flushCompositingState):
2064         (WebCore::GraphicsLayerCA::computeVisibleRect):
2065         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2066         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2067         (WebCore::GraphicsLayerCA::updateAnimations):
2068         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
2069         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
2070         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
2071         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
2072         (WebCore::GraphicsLayerCA::updateContentsScale):
2073         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
2074         * platform/graphics/ca/GraphicsLayerCA.h:
2075         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
2076
2077 2013-09-17  Eric Carlson  <eric.carlson@apple.com>
2078
2079         MediaStream API: Changing the device enumeration to be async
2080         https://bugs.webkit.org/show_bug.cgi?id=120883
2081
2082         Reviewed by Darin Adler.
2083
2084         Parts merged from https://chromium.googlesource.com/chromium/blink/+/40a96080a1531e50de4eb84571c7dc9fb321ece5
2085         and https://chromium.googlesource.com/chromium/blink/+/ff783a23bb1add588971a8187048a305cf485121
2086         by Tommy Widenflycht.
2087
2088         Test: fast/mediastream/MediaStreamTrack-getSources.html
2089
2090         * CMakeLists.txt: Added new files.
2091         * DerivedSources.make: Ditto.
2092         * GNUmakefile.list.am: Ditto.
2093
2094         * Modules/mediastream/MediaStreamTrack.cpp:
2095         (WebCore::MediaStreamTrack::kind): ASCIILiteral -> NeverDestroyed<AtomicString>.
2096         (WebCore::MediaStreamTrack::readyState): Ditto.
2097         (WebCore::MediaStreamTrack::getSources): New.
2098         * Modules/mediastream/MediaStreamTrack.h:
2099         * Modules/mediastream/MediaStreamTrack.idl:
2100
2101         * Modules/mediastream/MediaStreamTrackSourcesCallback.h: Added.
2102         * Modules/mediastream/MediaStreamTrackSourcesCallback.idl: Added.
2103         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp: Added.
2104         * Modules/mediastream/MediaStreamTrackSourcesRequest.h: Added.
2105
2106         * Modules/mediastream/SourceInfo.cpp: Added.
2107         * Modules/mediastream/SourceInfo.h: Added.
2108         * Modules/mediastream/SourceInfo.idl: Added.
2109
2110         * WebCore.xcodeproj/project.pbxproj: Add new files.
2111
2112         * bindings/js/JSDOMBinding.h: Add toJS templates for Vector<T> and Vector<RefPtr<T>>.
2113
2114         * platform/mediastream/MediaStreamCenter.h: Add prototype for getMediaStreamTrackSources.
2115
2116         * platform/mediastream/MediaStreamTrackSourcesRequestClient.h: Added.
2117
2118         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
2119         (WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added.
2120         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
2121
2122         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
2123         (WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added
2124         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
2125
2126         * platform/mediastream/mac/MediaStreamCenterMac.cpp:
2127         (WebCore::MediaStreamCenterMac::getMediaStreamTrackSources): Added.
2128         * platform/mediastream/mac/MediaStreamCenterMac.h:
2129
2130 2013-09-17  Commit Queue  <commit-queue@webkit.org>
2131
2132         Unreviewed, rolling out r155976.
2133         http://trac.webkit.org/changeset/155976
2134         https://bugs.webkit.org/show_bug.cgi?id=121512
2135
2136         Broke a test, needs cleanup (Requested by ap_ on #webkit).
2137
2138         * accessibility/AXObjectCache.cpp:
2139         (WebCore::AXObjectCache::handleAttributeChanged):
2140         * accessibility/AXObjectCache.h:
2141         * accessibility/mac/AXObjectCacheMac.mm:
2142         (WebCore::AXObjectCache::postPlatformNotification):
2143
2144 2013-09-17  Romain Perier  <romain.perier@gmail.com>
2145
2146         Improve srcset parser
2147         https://bugs.webkit.org/show_bug.cgi?id=119423
2148
2149         Reviewed by Benjamin Poulain.
2150
2151         Added new tests and covered by existing ones.
2152
2153         * html/parser/HTMLParserIdioms.cpp:
2154         (WebCore::isHTMLSpaceOrComma): Add a new predicate function used by String::find()
2155         to get the first space or comma character from the input string.
2156         (WebCore::parseImagesWithScaleFromSrcSetAttribute): Add a new static function to parse
2157         and extract images with scale from the srcset attribute. All valid candidates are
2158         returned to the caller through a list. This parsing function also adds support
2159         for data URI schemes as described by the specification.
2160         (WebCore::bestFitSourceForImageAttributes): Remove intermediate arrays of string
2161         when parsing. That is more efficient and avoids trashing the data cache
2162         (varying between 20 and 65% faster depending of the amount of data)
2163         The parser now walks along the attribute value and extracts the candidates directly.
2164
2165 2013-09-17  Gustavo Noronha Silva  <gns@gnome.org>
2166
2167         Unreviewed build fix after 155963.
2168
2169         * platform/gtk/RenderThemeGtk3.cpp:
2170         (WebCore::getStyleContext): use nullptr instead of 0.
2171
2172 2013-09-17  Alexey Proskuryakov  <ap@apple.com>
2173
2174         Make SVGTransform::valueAsString use StringBuilder
2175         https://bugs.webkit.org/show_bug.cgi?id=121498
2176
2177         Unreviewed typo fix, should address a regression on svg/dom/SVGViewSpec.html.
2178
2179         * svg/SVGTransform.cpp: (WebCore::SVGTransform::valueAsString): "e" is totally
2180         not the same as "f".
2181
2182 2013-09-16  Simon Fraser  <simon.fraser@apple.com>
2183
2184         Hardware accelerated CSS transitions appear pixelated when scaled up using transform
2185         https://bugs.webkit.org/show_bug.cgi?id=27684
2186         <rdar://problem/6134606>
2187
2188         Reviewed by Dean Jackson.
2189         
2190         Take transforms and animations into account when computing the contentsScale
2191         for a layer, so that scaled-up layers remain sharp most of the time.
2192         
2193         In its recursiveCommitChanges() tree walk, GraphicsLayerCA now tracks
2194         a root-relative transform, and extracts from that transform the X and Y
2195         scales which it uses to scale the backing store.
2196         
2197         If the layer has transform animations on it, we keep around
2198         a transformation matrix for the animation endpoints (or keyframes),
2199         pick up the state that has the larger impact on the root-relative scale,
2200         and use that as the layer's transform, and the transform when recursing
2201         over descendants.
2202
2203         Tests: compositing/contents-scale/animating.html
2204                compositing/contents-scale/scaled-ancestor.html
2205                compositing/contents-scale/simple-scale.html
2206                compositing/contents-scale/z-translate.html
2207
2208         * platform/graphics/ca/GraphicsLayerCA.cpp:
2209         (WebCore::maxScaleFromTransform): Decompose the transform if necesssary
2210         to extract the X and Y scale components.
2211         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Initialize m_rootRelativeScaleFactor.
2212         (WebCore::GraphicsLayerCA::flushCompositingState): Supply a TransformationMatrix
2213         for the root of the recursion.
2214         (WebCore::GraphicsLayerCA::layerTransform): This code was factored out of
2215         computeVisibleRect(), and optionally takes a custom transform.
2216         (WebCore::GraphicsLayerCA::computeVisibleRect): Use the layerTransform() function.
2217         (WebCore::GraphicsLayerCA::updateRootRelativeScale): Given a transform from the root,
2218         find the max scale factor by multiplying the various animation endpoint matrices and picking
2219         the one with the biggest impact on scale. Use this to set m_rootRelativeScaleFactor, and
2220         set the flag to say that we need to update contentsScale.
2221         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2222         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): After updating
2223         animations, call updateRootRelativeScale() to update m_rootRelativeScaleFactor.
2224         (WebCore::GraphicsLayerCA::updateAnimations): We have a side table of animation name to
2225         TransformationMatrix, so figure out which entries can be removed from that side table,
2226         and remove them.
2227         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
2228         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): Store the matrices for
2229         animation endpoints/keyframes in the m_animationTransforms side table. We don't store
2230         them directly in LayerPropertyAnimation because we just want the final matrix for
2231         a transform list, and using a side table makes ownership easier to manage.
2232         (WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact):
2233         goes through the matrices for the running animation endpoints/keyframes, and
2234         multiplies each with the transform up to this layer to find the matrix with the
2235         larger impact on scale.
2236         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints): Returns a vector
2237         of TransformationMatrix for the from and to states.
2238         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes): Returns a vector
2239         of TransformationMatrix for the keyframes.
2240         (WebCore::GraphicsLayerCA::updateContentsScale): Include m_rootRelativeScaleFactor in the
2241         scale factor computation.
2242         (WebCore::GraphicsLayerCA::dumpAdditionalProperties): If we're dumping visible rects,
2243         also dump the contentsScale. Convenient at these are useful to look at together, and I didn't
2244         want to pollute Internals with yet more flags.
2245         * platform/graphics/ca/GraphicsLayerCA.h:
2246         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation): Formatting.
2247
2248 2013-09-17  Samuel White  <samuel_white@apple.com>
2249
2250         AX: Expose ARIA Busy Notifications
2251         https://bugs.webkit.org/show_bug.cgi?id=121451
2252
2253         Reviewed by Darin Adler.
2254
2255         Added AXElementBusyChanged notification that posts when aria-busy is toggled. This
2256         enables screen readers to detect busy states without polling the focused element.
2257
2258         Test: platform/mac/accessibility/element-busy-changed.html
2259
2260         * accessibility/AXObjectCache.cpp:
2261         (WebCore::AXObjectCache::handleAttributeChanged):
2262         * accessibility/AXObjectCache.h:
2263         * accessibility/mac/AXObjectCacheMac.mm:
2264         (WebCore::AXObjectCache::postPlatformNotification):
2265
2266 2013-09-17  Antti Koivisto  <antti@apple.com>
2267
2268         Add isTextOrBR() and use it
2269         https://bugs.webkit.org/show_bug.cgi?id=121506
2270
2271         Reviewed by Darin Adler.
2272
2273         It is a popular test.
2274
2275         * dom/Document.cpp:
2276         (WebCore::Document::updateHoverActiveState):
2277         * editing/Editor.cpp:
2278         (WebCore::findFirstMarkable):
2279         * editing/TextIterator.cpp:
2280         (WebCore::ignoresContainerClip):
2281         * rendering/InlineBox.cpp:
2282         (WebCore::InlineBox::logicalHeight):
2283         * rendering/InlineIterator.h:
2284         (WebCore::isIteratorTarget):
2285         * rendering/RenderBlock.cpp:
2286         (WebCore::InlineMinMaxIterator::next):
2287         * rendering/RenderBlockLineLayout.cpp:
2288         (WebCore::RenderBlockFlow::layoutInlineChildren):
2289         * rendering/RenderCounter.cpp:
2290         (WebCore::planCounter):
2291         * rendering/RenderObject.h:
2292         (WebCore::RenderObject::isTextOrBR):
2293         * rendering/RenderTreeAsText.cpp:
2294         (WebCore::write):
2295         * rendering/RootInlineBox.cpp:
2296         (WebCore::RootInlineBox::ascentAndDescentForBox):
2297         (WebCore::RootInlineBox::verticalPositionForBox):
2298
2299 2013-09-17  Antti Koivisto  <antti@apple.com>
2300
2301         RenderBR should not be RenderText
2302         https://bugs.webkit.org/show_bug.cgi?id=121221
2303
2304         Rubber-stamped by Andreas Kling.
2305         
2306         Fix assertion in these tests:
2307
2308         fast/repaint/selection-rl.html
2309         fast/writing-mode/horizontal-bt-replaced-selection.html
2310         fast/writing-mode/vertical-rl-replaced-selection.html
2311
2312         * rendering/InlineBox.cpp:
2313         (WebCore::InlineBox::nodeAtPoint):
2314
2315 2013-09-16  Enrica Casucci  <enrica@apple.com>
2316
2317         Remove unused function didSetSelectionTypesForPasteboard from EditorClient.
2318         https://bugs.webkit.org/show_bug.cgi?id=121464
2319
2320         Reviewed by Darin Adler.
2321
2322         This method was only implemented in WebEditorClient.mm for Mac where it was
2323         calling a private delegate that is no longer in use.
2324         This patch removes it for all the platforms.
2325         I've also removed setTypes and writeAfterSettingTypes from the implementation
2326         of the Pasteboard class for Mac.
2327
2328         * editing/mac/EditorMac.mm:
2329         (WebCore::Editor::writeSelectionToPasteboard): Now calls write instead of
2330         setTypes and writeAfterSettingTypes.
2331         * loader/EmptyClients.h: Removed didSetSelectionTypesForPasteboard.
2332         * page/EditorClient.h: Ditto.
2333         * platform/Pasteboard.h: Removed setTypes and writeAfterSettingTypes.
2334         * platform/ios/PasteboardIOS.mm:
2335         (WebCore::Pasteboard::writeSelection): Removed call to didSetSelectionTypesForPasteboard.
2336         * platform/mac/PasteboardMac.mm:
2337         (WebCore::Pasteboard::write): Added to replace setTypes and writeAfterSettingTypes.
2338
2339 2013-09-17  Darin Adler  <darin@apple.com>
2340
2341         Further shrink table-populating code by making the tables read-only data and preventing inlining
2342         https://bugs.webkit.org/show_bug.cgi?id=121468
2343
2344         Reviewed by Sam Weinig.
2345
2346         * bindings/scripts/StaticString.pm:
2347         (GenerateStrings): Eliminated the xxxImpl globals. We definitely did not need
2348         globals for these, much less read-write data. Instead, write the expression at
2349         each site where we need them.
2350         (GenerateStringAsserts): This is one such site (see above).
2351         * css/CSSSelector.cpp:
2352         (WebCore::populatePseudoTypeByNameMap): Mark this function NEVER_INLINE and
2353         add static to make sure the table ends up in read-only data.
2354         * dom/make_names.pl:
2355         (printDefinitions): Write the xxxImpl expression (see above).
2356         (printFactoryCppFile): Ditto. Also mark the populate function NEVER_INLINE and
2357         add static to make sure the table ends up in read-only data.
2358         (printWrapperFactoryCppFile): Ditto.
2359         * html/HTMLElement.cpp:
2360         (WebCore::populateEventNameForAttributeLocalNameMap): Mark this function
2361         NEVER_INLINE and add static to makes sure the table ends up in read-only data.
2362
2363         * platform/text/UnicodeRange.cpp: Added a const to make this read-only data.
2364
2365 2013-09-17  Darin Adler  <darin@apple.com>
2366
2367         Shrink SVGElement::cssPropertyIdForSVGAttributeName and cssPropertyToTypeMap
2368         https://bugs.webkit.org/show_bug.cgi?id=121499
2369
2370         Reviewed by Andreas Kling.
2371
2372         * svg/SVGElement.cpp:
2373         (WebCore::populateAttributeNameToCSSPropertyIDMap): Added. Code that used to
2374         be in SVGElement::cssPropertyIdForSVGAttributeName to build a map that maps
2375         attribute names to CSS property IDs, but without the multiple unrolled calls
2376         to HashMap functions.
2377         (WebCore::populateAttributeNameToAnimatedPropertyTypeMap): Added. Code that
2378         used to be in cssPropertyToTypeMap, but without the multiple unrolled calls
2379         to HashMap functions.
2380         (WebCore::attributeNameToAnimatedPropertyTypeMap): Renamed from
2381         cssPropertyToTypeMap, a confusingly inaccurate and imprecise name, and
2382         reimplemented using the populate function.
2383         (WebCore::SVGElement::animatedPropertyTypeForAttribute): Updated to call
2384         attributeNameToAnimatedPropertyTypeMap, and also removed the double hashing
2385         that was done by calling contains followed by get.
2386         (WebCore::SVGElement::cssPropertyIdForSVGAttributeName): Rewrote to use
2387         populateAttributeNameToCSSPropertyIDMap.
2388         (WebCore::SVGElement::isAnimatableCSSProperty): Updated to call the new
2389         attributeNameToAnimatedPropertyTypeMap.
2390
2391 2013-09-17  Darin Adler  <darin@apple.com>
2392
2393         Make SVGTransform::valueAsString use StringBuilder
2394         https://bugs.webkit.org/show_bug.cgi?id=121498
2395
2396         Reviewed by Andreas Kling.
2397
2398         * svg/SVGTransform.cpp:
2399         (WebCore::SVGTransform::valueAsString): Use StringBuilder constently to
2400         avoid creating temporary String objects that cause additional, slow
2401         memory allocation.
2402
2403 2013-09-17  Darin Adler  <darin@apple.com>
2404
2405         Get rid of a couple unneeded NeverDestroyed::get() calls
2406         https://bugs.webkit.org/show_bug.cgi?id=121500
2407
2408         Reviewed by Andreas Kling.
2409
2410         * css/CSSSelector.cpp:
2411         (WebCore::CSSSelector::parsePseudoType): No need to call get() here.
2412         * dom/make_names.pl:
2413         (printFactoryCppFile): Ditto.
2414         (printWrapperFactoryCppFile): Ditto.
2415
2416 2013-09-17  Hans Muller  <hmuller@adobe.com>
2417
2418         Bad ASSERT() in RasterShapeIntervals::firstIncludedIntervalY()
2419         https://bugs.webkit.org/show_bug.cgi?id=121455
2420
2421         Reviewed by Darin Adler.
2422
2423         Corrected a bad ASSERT() introduced in https://bugs.webkit.org/show_bug.cgi?id=120211.
2424
2425         Test: fast/shapes/shape-inside/shape-inside-first-fit-crash.html
2426
2427         * rendering/shapes/RasterShape.cpp:
2428         (WebCore::RasterShapeIntervals::firstIncludedIntervalY):
2429
2430 2013-09-16  David Hyatt  <hyatt@apple.com>
2431
2432         Move the line widow functions out of RenderBlock and into RenderBlockFlow.
2433         https://bugs.webkit.org/show_bug.cgi?id=121456
2434
2435         Reviewed by Dean Jackson.
2436
2437         * rendering/RenderBlock.cpp:
2438         * rendering/RenderBlock.h:
2439         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
2440         * rendering/RenderBlockFlow.cpp:
2441         (WebCore::RenderBlockFlow::layoutBlockChild):
2442         (WebCore::calculateMinimumPageHeight):
2443         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
2444         (WebCore::RenderBlockFlow::setBreakAtLineToAvoidWidow):
2445         (WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidow):
2446         (WebCore::RenderBlockFlow::relayoutToAvoidWidows):
2447         * rendering/RenderBlockFlow.h:
2448         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
2449         (WebCore::RenderBlockFlow::shouldBreakAtLineToAvoidWidow):
2450         (WebCore::RenderBlockFlow::lineBreakToAvoidWidow):
2451         * rendering/RenderBlockLineLayout.cpp:
2452         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2453         (WebCore::RenderBlock::linkToEndLineIfNeeded):
2454         (WebCore::RenderBlock::determineStartPosition):
2455         (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
2456         * rendering/RenderObject.h:
2457
2458 2013-09-16  Anders Carlsson  <andersca@apple.com>
2459
2460         HashMap should work with move-only keys
2461         https://bugs.webkit.org/show_bug.cgi?id=121310
2462
2463         Reviewed by Darin Adler.
2464
2465         Update the call sites now that HashMap::take doesn't return a PassOwnPtr.
2466
2467         * rendering/RenderRegion.cpp:
2468         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
2469         * rendering/RenderRegion.h:
2470         * rendering/svg/RenderSVGResourceContainer.cpp:
2471         (WebCore::RenderSVGResourceContainer::registerResource):
2472         * svg/SVGDocumentExtensions.cpp:
2473         (WebCore::SVGDocumentExtensions::removePendingResource):
2474         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
2475         * svg/SVGDocumentExtensions.h:
2476
2477 2013-09-17  Antti Koivisto  <antti@apple.com>
2478
2479         Add RenderObject bit for isBR().
2480         https://bugs.webkit.org/show_bug.cgi?id=121494
2481
2482         Reviewed by Andreas Kling.
2483
2484         It is no longer piggybacking on isText() flag and is now hot in inline layout.
2485
2486         * rendering/RenderBR.cpp:
2487         (WebCore::RenderBR::RenderBR):
2488         * rendering/RenderBR.h:
2489         * rendering/RenderObject.h:
2490         (WebCore::RenderObject::isBR):
2491         (WebCore::RenderObject::setIsBR):
2492         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2493
2494 2013-09-17  Andreas Kling  <akling@apple.com>
2495
2496         Export some missing symbols for Internals after RenderArena& change.
2497
2498         * WebCore.exp.in:
2499
2500 2013-09-17  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2501
2502         Set MessageEvent.source to the newly created port for shared workers' connect events
2503         https://bugs.webkit.org/show_bug.cgi?id=121390
2504
2505         Reviewed by Darin Adler.
2506
2507         Set MessageEvent.source to the newly created port for shared workers' connect events
2508         instead of previously null, as per the latest specification:
2509         http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#dom-messageevent-source
2510         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dom-sharedworker
2511
2512         This behavior is consisent with Blink.
2513
2514         Test: fast/workers/shared-worker-messageevent-source.html
2515
2516         * dom/EventTarget.cpp:
2517         (WebCore::EventTarget::isMessagePort):
2518         * dom/EventTarget.h:
2519         * dom/MessageEvent.cpp:
2520         (WebCore::isValidSource):
2521         (WebCore::MessageEvent::MessageEvent):
2522         * dom/MessageEvent.h:
2523         Use null String instead of an empty String as default value for origin and lastEventId.
2524         This is more efficient and has no impact on the behavior on the JavaScript since a
2525         null String is exposed as an empty one on JS side.
2526         This change is covered by fast/events/constructors/message-event-constructor.html
2527         * dom/MessageEvent.idl:
2528         * dom/MessagePort.h:
2529         * page/DOMWindow.cpp:
2530         (WebCore::PostMessageTimer::event):
2531         * workers/SharedWorkerGlobalScope.cpp:
2532         (WebCore::createConnectEvent):
2533
2534 2013-09-17  Antti Koivisto  <antti@apple.com>
2535
2536         RenderBR should not be RenderText
2537         https://bugs.webkit.org/show_bug.cgi?id=121221
2538
2539         Reviewed by Darin Adler.
2540
2541         Stop inheriting RenderBR from RenderText and make it be a RenderBoxModelObject instead. RenderBR was one
2542         of the few cases where Element renderer was a RenderText. This will enable future cleanups.
2543         
2544         RenderBR used little of RenderText mechanisms and was already heavily specialized everywhere. Layout code
2545         didn't care about its text content at all. The new RenderText is also significatly more lightweight
2546         than the old. As a line box it uses plain InlineBox instead of InlineTextBox.
2547         
2548         The patch tries to avoid changing test results though there are a few changed render tree dumps without
2549         visual effect. There are also two rendering progressions.
2550
2551         * accessibility/AccessibilityRenderObject.cpp:
2552         (WebCore::AccessibilityRenderObject::textUnderElement):
2553         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2554         * dom/ContainerNode.cpp:
2555         (WebCore::ContainerNode::getUpperLeftCorner):
2556         * dom/Document.cpp:
2557         (WebCore::Document::updateHoverActiveState):
2558         * dom/Position.cpp:
2559         (WebCore::hasInlineBoxWrapper):
2560         (WebCore::nextRenderedEditable):
2561         (WebCore::previousRenderedEditable):
2562         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
2563         (WebCore::Position::getInlineBoxAndOffset):
2564         * dom/Range.cpp:
2565         (WebCore::Range::textRects):
2566         (WebCore::Range::textQuads):
2567         * editing/ApplyStyleCommand.cpp:
2568         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
2569         * editing/Editor.cpp:
2570         (WebCore::findFirstMarkable):
2571         * editing/TextIterator.cpp:
2572         (WebCore::ignoresContainerClip):
2573         * editing/VisibleUnits.cpp:
2574         (WebCore::CachedLogicallyOrderedLeafBoxes::previousTextOrLineBreakBox):
2575         (WebCore::CachedLogicallyOrderedLeafBoxes::nextTextOrLineBreakBox):
2576         (WebCore::logicallyPreviousBox):
2577         (WebCore::logicallyNextBox):
2578         (WebCore::wordBreakIteratorForMinOffsetBoundary):
2579         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
2580         * rendering/InlineBox.cpp:
2581         (WebCore::InlineBox::logicalHeight):
2582         (WebCore::InlineBox::baselinePosition):
2583         (WebCore::InlineBox::lineHeight):
2584         (WebCore::InlineBox::deleteLine):
2585         (WebCore::InlineBox::extractLine):
2586         (WebCore::InlineBox::attachLine):
2587         (WebCore::InlineBox::paint):
2588         * rendering/InlineBox.h:
2589         (WebCore::InlineBox::isLineBreak):
2590         * rendering/InlineFlowBox.cpp:
2591         (WebCore::InlineFlowBox::computeOverflow):
2592         * rendering/InlineIterator.h:
2593         (WebCore::isIteratorTarget):
2594         * rendering/InlineTextBox.cpp:
2595         (WebCore::InlineTextBox::lineHeight):
2596         (WebCore::InlineTextBox::isLineBreak):
2597         * rendering/RenderBR.cpp:
2598         (WebCore::RenderBR::RenderBR):
2599         (WebCore::RenderBR::~RenderBR):
2600         (WebCore::RenderBR::createAnonymous):
2601         (WebCore::RenderBR::lineHeight):
2602         (WebCore::RenderBR::baselinePosition):
2603         (WebCore::RenderBR::createInlineBox):
2604         (WebCore::RenderBR::setInlineBoxWrapper):
2605         (WebCore::RenderBR::replaceInlineBoxWrapper):
2606         (WebCore::RenderBR::deleteInlineBoxWrapper):
2607         (WebCore::RenderBR::dirtyLineBoxes):
2608         (WebCore::RenderBR::caretMinOffset):
2609         (WebCore::RenderBR::caretMaxOffset):
2610         (WebCore::RenderBR::canBeSelectionLeaf):
2611         (WebCore::RenderBR::setSelectionState):
2612         (WebCore::RenderBR::localCaretRect):
2613         (WebCore::RenderBR::linesBoundingBox):
2614         (WebCore::RenderBR::absoluteRects):
2615         (WebCore::RenderBR::absoluteQuads):
2616         (WebCore::RenderBR::updateFromStyle):
2617         (WebCore::RenderBR::borderBoundingBox):
2618         * rendering/RenderBR.h:
2619         (WebCore::toRenderBR):
2620         * rendering/RenderBlock.cpp:
2621         (WebCore::InlineMinMaxIterator::next):
2622         (WebCore::RenderBlock::updateFirstLetter):
2623         * rendering/RenderBlockLineLayout.cpp:
2624         (WebCore::createInlineBoxForRenderer):
2625         (WebCore::dirtyLineBoxesForRenderer):
2626         (WebCore::reachedEndOfTextRenderer):
2627         (WebCore::RenderBlock::computeBlockDirectionPositionsForLine):
2628         (WebCore::RenderBlockFlow::layoutInlineChildren):
2629         (WebCore::requiresLineBox):
2630         (WebCore::shouldSkipWhitespaceAfterStartObject):
2631         (WebCore::canBreakAtThisPosition):
2632         * rendering/RenderInline.cpp:
2633         (WebCore::RenderInline::generateCulledLineBoxRects):
2634         (WebCore::RenderInline::culledInlineFirstLineBox):
2635         (WebCore::RenderInline::culledInlineLastLineBox):
2636         (WebCore::RenderInline::dirtyLineBoxes):
2637         * rendering/RenderLineBoxList.cpp:
2638         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
2639         * rendering/RenderMenuList.cpp:
2640         (WebCore::RenderMenuList::RenderMenuList):
2641         (WebCore::RenderMenuList::styleDidChange):
2642         (WebCore::RenderMenuList::setText):
2643         (WebCore::RenderMenuList::text):
2644         * rendering/RenderMenuList.h:
2645         * rendering/RenderObject.h:
2646         (WebCore::RenderObject::isBeforeContent):
2647         (WebCore::RenderObject::isAfterContent):
2648         * rendering/RenderObjectChildList.cpp:
2649         (WebCore::RenderObjectChildList::removeChildNode):
2650         * rendering/RenderText.cpp:
2651         (WebCore::RenderText::removeAndDestroyTextBoxes):
2652         (WebCore::RenderText::computePreferredLogicalWidths):
2653         (WebCore::RenderText::setTextInternal):
2654         * rendering/RenderTreeAsText.cpp:
2655         (WebCore::RenderTreeAsText::writeRenderObject):
2656         * rendering/RootInlineBox.cpp:
2657         (WebCore::RootInlineBox::ascentAndDescentForBox):
2658         (WebCore::RootInlineBox::verticalPositionForBox):
2659
2660 2013-09-17  Andreas Kling  <akling@apple.com>
2661
2662         Dodge more work during render tree teardown.
2663         <https://webkit.org/b/121487>
2664
2665         Reviewed by Antti Koivisto.
2666
2667         Add a Document::hasLivingRenderTree() method that returns true if
2668         there's a render tree attached to the document and it's not in the
2669         process of being torn down.
2670
2671         Deploy this check in a number of places that were only checking
2672         for the presence of a RenderView.
2673
2674 2013-09-17  Eric Carlson  <eric.carlson@apple.com>
2675
2676         MediaStream API: Adding an async RTCPeerConnection::addIceCandidate
2677         https://bugs.webkit.org/show_bug.cgi?id=121403
2678
2679         Merged from https://chromium.googlesource.com/chromium/blink/+/5bd81fda88d48dd2780832246e7d1ab973ee7a1d
2680
2681         Reviewed by Darin Adler.
2682
2683         No new tests, updated RTCPeerConnection-ice.html.
2684
2685         * Modules/mediastream/RTCPeerConnection.cpp:
2686         (WebCore::RTCPeerConnection::addIceCandidate): Add success and error callbacks.
2687         * Modules/mediastream/RTCPeerConnection.h:
2688         * Modules/mediastream/RTCPeerConnection.idl:
2689
2690         * platform/mediastream/RTCPeerConnectionHandler.h: Changed addIceCandidate signature.
2691
2692         * platform/mediastream/RTCVoidRequest.h: Removed ExtraData, it is unnecessary.
2693
2694 2013-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2695
2696         [GTK] Do not include Returns tag in api doc for methods returning void
2697         https://bugs.webkit.org/show_bug.cgi?id=121488
2698
2699         Reviewed by Philippe Normand.
2700
2701         * bindings/gobject/WebKitDOMCustom.h:
2702         * bindings/scripts/CodeGeneratorGObject.pm:
2703         (GenerateFunction): Only add Returns tag for methods not returning
2704         void.
2705         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
2706         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
2707         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
2708         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2709         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
2710
2711 2013-09-17  Michael Brüning  <michael.bruning@digia.com>
2712
2713         Correct range used for Emoji checks.
2714         https://bugs.webkit.org/show_bug.cgi?id=121486
2715
2716         Reviewed by Allan Sandfeld Jensen.
2717
2718         Found and reported by David Binderman via Qt bug tracker.
2719
2720         The check if a character was in the Emoji range always evaluated to
2721         false due to the upper range limit being lower than the lower limit.
2722
2723         Changed the upper limit to the highest assigned character from the
2724         "Transport and Map Symbols" (0x1F6C5) as that seems to have been the
2725         intended upper range limit of this check.
2726
2727         * platform/graphics/Font.cpp:
2728         (WebCore::Font::isCJKIdeographOrSymbol):
2729
2730 2013-09-17  Antti Koivisto  <antti@apple.com>
2731
2732         Move text caret rect computation to root inline box
2733         https://bugs.webkit.org/show_bug.cgi?id=121479
2734
2735         Reviewed by Andreas Kling.
2736
2737         For future code sharing.
2738
2739         * rendering/RenderText.cpp:
2740         (WebCore::RenderText::localCaretRect):
2741         * rendering/RootInlineBox.cpp:
2742         (WebCore::RootInlineBox::computeCaretRect):
2743         * rendering/RootInlineBox.h:
2744
2745 2013-09-17  Alberto Garcia  <berto@igalia.com>
2746
2747         [GTK] Don't make the GObject DOM bindings API break test fatal
2748         https://bugs.webkit.org/show_bug.cgi?id=121484
2749
2750         Reviewed by Carlos Garcia Campos.
2751
2752         The API varies depending on the compilation options, so this can
2753         easily produce false positives.
2754
2755         Until we figure out a way to handle this situation we shouldn't
2756         make this test fatal.
2757
2758         * bindings/scripts/gobject-run-api-break-test:
2759         (check_api):
2760
2761 2013-09-17  Mihnea Ovidenie  <mihnea@adobe.com>
2762
2763         [CSSRegions] Replace generatingNode() with generatingElement() for RenderRegion
2764         https://bugs.webkit.org/show_bug.cgi?id=121469
2765
2766         Reviewed by Antti Koivisto.
2767
2768         The fix for https://bugs.webkit.org/show_bug.cgi?id=120397 replaced node() with generatingElement() for regions, but i forgot about replacing generatingNode() with generatingElement() in RenderNamedFlowThread::compareRenderRegions. This is needed in preparation for regions as anonymous blocks refactoring in https://bugs.webkit.org/show_bug.cgi?id=119135.
2769
2770         No new functionality introduced, therefore no new tests.
2771
2772         * rendering/RenderNamedFlowThread.cpp:
2773         (WebCore::compareRenderRegions):
2774
2775 2013-09-17  Andreas Kling  <akling@apple.com>
2776
2777         CTTE: Pass RenderArena around by reference.
2778         <https://webkit.org/b/121470>
2779
2780         Reviewed by Antti Koivisto.
2781
2782         Pass the RenderArena around by reference in all render tree code.
2783         This code will never be running without an arena.
2784
2785 2013-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2786
2787         [GTK] GObject DOM symbols file is not generated for video related classes
2788         https://bugs.webkit.org/show_bug.cgi?id=121476
2789
2790         Reviewed by Philippe Normand.
2791
2792         The problem is that we are using a different path for video
2793         related header files in the Makefile, it's the same path in
2794         practice, because we are just prepending ./ to the path, but the
2795         rules that parse those paths don't expect the ./ at the beginning.
2796
2797         * bindings/gobject/GNUmakefile.am: Use the same path for video
2798         related header files as the other paths in
2799         webkitgtk_gdom_built_h_api.
2800         * bindings/gobject/webkitdom.symbols: Updated to include the
2801         symbols of the video related clases.
2802
2803 2013-09-17  Andreas Kling  <akling@apple.com>
2804
2805         Remove ContextFeatures.
2806         <https://webkit.org/b/121473>
2807
2808         Reviewed by Antti Koivisto.
2809
2810         This was only used by the chromium port, nobody implements ContextFeaturesClient.
2811
2812 2013-09-17  Andreas Kling  <akling@apple.com>
2813
2814         Un-dork the build. :|
2815
2816 2013-09-17  Andreas Kling  <akling@apple.com>
2817
2818         Unreviewed, fix clang warning when building without ENABLE(STYLE_SCOPED).
2819
2820 2013-09-08  Andreas Kling  <akling@apple.com>
2821
2822         Move <style scoped> code behind ENABLE(STYLE_SCOPED)
2823         <https://webkit.org/b/121018>
2824
2825         Reviewed by Darin Adler.
2826
2827         Move all the code for <style scoped> behind ENABLE(STYLE_SCOPED) guards.
2828         It's not nice to clutter common codepaths with code that always executes
2829         even though the feature is disabled at compile-time.
2830
2831 2013-09-16  Sam Weinig  <sam@webkit.org>
2832
2833         CTTE: InputType should store its HTMLInputElement back pointer as a reference
2834         https://bugs.webkit.org/show_bug.cgi?id=121466
2835
2836         Reviewed by Anders Carlsson.
2837
2838         - Converts InputType::create() and InputType::createText() to take a HTMLInputElement&
2839           (as well as all the subclasses).
2840         - Change InputType::element() to return an HTMLInputElement& and update all the callers.
2841
2842 2013-09-16  Timothy Hatcher  <timothy@apple.com>
2843
2844         Make InspectorTimelineAgent use an enum for the record type instead of a string.
2845
2846         https://bugs.webkit.org/show_bug.cgi?id=121461
2847
2848         Reviewed by Joseph Pecoraro.
2849
2850         * inspector/Inspector.json:
2851         * inspector/InspectorTimelineAgent.cpp:
2852         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
2853         (WebCore::toProtocol):
2854         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2855         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
2856         (WebCore::InspectorTimelineAgent::appendRecord):
2857         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2858         * inspector/InspectorTimelineAgent.h:
2859         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
2860
2861 2013-09-16  Joseph Pecoraro  <pecoraro@apple.com>
2862
2863         Add RunLoop::isMain and use it in WebKit2
2864         https://bugs.webkit.org/show_bug.cgi?id=121459
2865
2866         Reviewed by Anders Carlsson.
2867
2868         * WebCore.exp.in:
2869         * platform/RunLoop.cpp:
2870         (WebCore::RunLoop::isMain):
2871         * platform/RunLoop.h:
2872
2873 2013-09-16  Chris Fleizach  <cfleizach@apple.com>
2874
2875         AX: ARIA tablist is disabled, but VoiceOver does not speak the tabs as dimmed
2876         https://bugs.webkit.org/show_bug.cgi?id=121408
2877
2878         Reviewed by Darin Adler.
2879
2880         ARIA says that aria-disabled should propagate to children nodes.
2881
2882         Test: accessibility/aria-disabled-propagated-to-children.html
2883
2884         * accessibility/AccessibilityNodeObject.cpp:
2885         (WebCore::AccessibilityNodeObject::isEnabled):
2886
2887 2013-09-16  Sam Weinig  <sam@webkit.org>
2888
2889         CTTE: Element::createRenderer() should take references
2890         https://bugs.webkit.org/show_bug.cgi?id=121449
2891
2892         Reviewed by Anders Carlsson.
2893
2894         *Many file elided*
2895
2896 2013-09-16  Enrica Casucci  <enrica@apple.com>
2897
2898         iOS build fix after r155638.
2899
2900         Unreviewed.
2901
2902         * editing/Editor.cpp:
2903
2904 2013-09-16  Bem Jones-Bey  <bjonesbe@adobe.com>
2905
2906         Make FloatingObjects own it's FloatingObject instances
2907         https://bugs.webkit.org/show_bug.cgi?id=121323
2908
2909         Reviewed by Alexandru Chiculita.
2910
2911         As part of decoupling FloatingObjects from RenderBlock, change
2912         FloatingObjects to properly manage the FloatingObject instances it
2913         contains.
2914
2915         No new tests, no behavior change.
2916
2917         * rendering/FloatingObjects.cpp:
2918         (WebCore::FloatingObject::FloatingObject): Make the constructors
2919         private so that FloatingObjects can only be created with an OwnPtr.
2920         Also make a RenderBox required to create a FloatingObject.
2921         (WebCore::FloatingObject::create): Factory method to create a vanilla
2922         FloatingObject.
2923         (WebCore::FloatingObject::copyToNewContainer): Factory method to copy
2924         an existing FloatingObject in the case it is overhanging or intruding
2925         and needs to be copied to the block that it overhangs or intrudes
2926         into.
2927         (WebCore::FloatingObject::unsafeClone): Rename this method so it is
2928         more obvious that it really shouldn't be used, and to make it more
2929         obvious that one should use the copyToNewContainer method for all
2930         normal FloatingObject copies.
2931         (WebCore::FloatingObjects::clear): Delete all the FloatingObjects in
2932         the set before clearing it.
2933         (WebCore::FloatingObjects::moveAllToFloatInfoMap): Move all of the
2934         FloatingObjects in the set to a RendererToFloatInfoMap. This is used
2935         in RenderBlockFlow::clearFloats to when it is readding floats after
2936         clearing the set.
2937         (WebCore::FloatingObjects::add): Take an OwnPtr.
2938         (WebCore::FloatingObjects::remove): Delete the removed FloatingObject.
2939         * rendering/FloatingObjects.h: Remove FloatingObject::setRenderer(),
2940         since the RenderBox must be set in the constructor.
2941         * rendering/RenderBlock.cpp:
2942         (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Rename clone
2943         to unsafeClone.
2944         (WebCore::RenderBlock::removeFloatingObjects): Don't delete anymore,
2945         since clear does it.
2946         (WebCore::RenderBlock::insertFloatingObject): Handle OwnPtr properly.
2947         (WebCore::RenderBlock::removeFloatingObject): Don't delete anymore,
2948         since remove does it.
2949         (WebCore::RenderBlock::removeFloatingObjectsBelow): Ditto.
2950         (WebCore::RenderBlock::addOverhangingFloats): Use copyToNewContainer
2951         and OwnPtr.
2952         (WebCore::RenderBlock::addIntrudingFloats): Ditto.
2953         * rendering/RenderBlockFlow.cpp:
2954         (WebCore::RenderBlockFlow::clearFloats): Use exportToFloatInfoMap.
2955
2956 2013-09-16  Hugo Parente Lima  <hugo.lima@openbossa.org>
2957
2958         Fix creation of embedded JS and CSS files on cmake based ports.
2959         https://bugs.webkit.org/show_bug.cgi?id=121448
2960
2961         Reviewed by Joseph Pecoraro.
2962
2963         Just a build fix, layout tests already test this issue.
2964
2965         * CMakeLists.txt:
2966
2967 2013-09-16  Anders Carlsson  <andersca@apple.com>
2968
2969         MessageQueue should use a Deque of OwnPtrs
2970         https://bugs.webkit.org/show_bug.cgi?id=121450
2971
2972         Reviewed by Andreas Kling.
2973
2974         * Modules/webdatabase/DatabaseThread.cpp:
2975         (WebCore::SameDatabasePredicate::operator()):
2976         * dom/default/PlatformMessagePortChannel.h:
2977         (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
2978         * fileapi/FileThread.cpp:
2979         (WebCore::SameInstancePredicate::operator()):
2980         * workers/WorkerRunLoop.cpp:
2981         (WebCore::ModePredicate::operator()):
2982
2983 2013-09-16  Andreas Kling  <akling@apple.com>
2984
2985         CTTE: FrameTree::top() should return a reference.
2986         <https://webkit.org/b/121445>
2987
2988         Reviewed by Anders Carlsson.
2989
2990         There's always a top frame in the tree.
2991
2992 2013-09-16  Zan Dobersek  <zdobersek@igalia.com>
2993
2994         Unreviewed, fixing GObject bindings tests after r155850 by adding the *.symbols files that are now also generated.
2995
2996         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.symbols: Added.
2997         * bindings/scripts/test/GObject/WebKitDOMTestCallback.symbols: Added.
2998         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.symbols: Added.
2999         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.symbols: Added.
3000         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.symbols: Added.
3001         * bindings/scripts/test/GObject/WebKitDOMTestException.symbols: Added.
3002         * bindings/scripts/test/GObject/WebKitDOMTestInterface.symbols: Added.
3003         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.symbols: Added.
3004         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.symbols: Added.
3005         * bindings/scripts/test/GObject/WebKitDOMTestNode.symbols: Added.
3006         * bindings/scripts/test/GObject/WebKitDOMTestObj.symbols: Added.
3007         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.symbols: Added.
3008         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.symbols: Added.
3009         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.symbols: Added.
3010
3011 2013-09-16  Daniel Bates  <dabates@apple.com>
3012
3013         Fix the build following <http://trac.webkit.org/changeset/155591>
3014         (https://bugs.webkit.org/show_bug.cgi?id=121200)
3015
3016         Fix the build for ports that enable PLUGIN_PROXY_FOR_VIDEO, such as iOS WebKit.
3017
3018         * html/shadow/MediaControlElements.cpp:
3019         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Substitute isWidget() for isRenderWidget()
3020         as the latter is undefined.
3021         * rendering/RenderLayerCompositor.cpp:
3022         (WebCore::RenderLayerCompositor::requiresCompositingForVideo): Ditto.
3023
3024 2013-09-16  Daniel Bates  <dabates@apple.com>
3025
3026         Build fix following <https://trac.webkit.org/r154358>
3027         (https://bugs.webkit.org/show_bug.cgi?id=120078)
3028
3029         Fix the build for ports that enable PLUGIN_PROXY_FOR_VIDEO, such as iOS WebKit.
3030
3031         * html/HTMLMediaElement.cpp:
3032         (WebCore::HTMLMediaElement::rendererIsNeeded): Substitute "style" for "context".
3033
3034 2013-09-16  Timothy Hatcher  <timothy@apple.com>
3035
3036         Make InspectorTypeBuilder generate better enums in C++.
3037
3038         https://bugs.webkit.org/show_bug.cgi?id=121440
3039
3040         Reviewed by Joseph Pecoraro.
3041
3042         * inspector/CodeGeneratorInspector.py:
3043         (fix_camel_case): Add more abbrivations.
3044         (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder): Use fix_camel_case
3045         * inspector/ConsoleMessage.cpp:
3046         (WebCore::messageSourceValue):
3047         (WebCore::messageTypeValue):
3048         * inspector/InspectorCSSAgent.cpp:
3049         (WebCore::InspectorCSSAgent::detectOrigin):
3050         * inspector/InspectorRuntimeAgent.cpp:
3051         (WebCore::InspectorRuntimeAgent::parse):
3052         * inspector/InspectorStyleSheet.cpp:
3053         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
3054         * inspector/InspectorStyleSheet.h:
3055         (WebCore::InspectorStyleSheet::canBind):
3056
3057 2013-09-16  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3058
3059         MediaStream API: Storing the constraints in MediaStreamSource
3060         https://bugs.webkit.org/show_bug.cgi?id=120882
3061
3062         based on: https://chromium.googlesource.com/chromium/blink/+/04ac7655b54ae98f55774afde3f8e92b6c6302e6
3063
3064         Reviewed by Eric Carlson.
3065
3066         No new tests needed.
3067
3068         * Modules/mediastream/UserMediaRequest.cpp:
3069         (WebCore::UserMediaRequest::succeed):
3070         * platform/mediastream/MediaStreamSource.h:
3071         (WebCore::MediaStreamSource::setConstraints):
3072         (WebCore::MediaStreamSource::constraints):
3073
3074 2013-09-16  Andreas Kling  <akling@apple.com>
3075
3076         Rebaseline bindings tests after Sam's Document& changes.
3077
3078 2013-09-16  Andreas Kling  <akling@apple.com>
3079
3080         Destroying a Document's render tree shouldn't make it impossible to recreate.
3081         <https://webkit.org/b/121437>
3082
3083         Reviewed by Antti Koivisto.
3084
3085         Rename Document::detach() to destroyRenderTree() and stop automatically
3086         disconnecting Document from its Frame after the deforestation.
3087
3088         Added Document::disconnectFromFrame() and do that after every call to
3089         destroyRenderTree() that we currently have.
3090
3091         This change doesn't alter any behavior on its own, but is a step towards
3092         being able to destroy and rebuild the render tree.
3093
3094 2013-09-16  Brent Fulgham  <bfulgham@apple.com>
3095
3096         Unreviewed warning correction. Avoid uninitialized renderer.
3097
3098         * css/CSSComputedStyleDeclaration.cpp:
3099         (WebCore::ComputedStyleExtractor::propertyValue): Renderer can be uninitialized.
3100
3101 2013-09-16  Brent Fulgham  <bfulgham@apple.com>
3102
3103         Unreviewed warning correction.
3104
3105         * css/CSSParser.cpp:
3106         (WebCore::CSSParser::parseFilter): Don't use 'value' as the input argument
3107         to the method, and the internal loop variable for the parser.
3108
3109 2013-09-16  peavo@outlook.com  <peavo@outlook.com>
3110
3111         [Win] Compile errors in WebCore derived sources.
3112         https://bugs.webkit.org/show_bug.cgi?id=121420
3113
3114         Reviewed by Brent Fulgham.
3115
3116         * dom/make_names.pl:
3117         (printNamesCppFile): Added const modifier.
3118         (printDefinitions): Use C style cast.
3119
3120 2013-09-16  Hans Muller  <hmuller@adobe.com>
3121
3122         [CSS Shapes] Winding rule polygon issues
3123         https://bugs.webkit.org/show_bug.cgi?id=120236
3124
3125         Reviewed by Dirk Schulze.
3126
3127         This patch corrects some of the problems with shape-inside and
3128         self-intersecting polygons and eliminates the layout flashing behavior
3129         that prompted the original bug report. The FloatPolygon::contains()
3130         method now respoects the polygon's fillRule and the PolygonShape code
3131         used to find shape-inside intervals for the top and bottom of a line
3132         now also handles fillRule correctly.
3133
3134         Tests: fast/shapes/shape-inside/shape-inside-complex-polygon-001.html
3135                fast/shapes/shape-inside/shape-inside-complex-polygon-002.html
3136                fast/shapes/shape-inside/shape-inside-complex-polygon-003.html
3137                fast/shapes/shape-inside/shape-inside-complex-polygon-004.html
3138
3139         * platform/graphics/FloatPolygon.cpp:
3140         (WebCore::FloatPolygon::containsEvenOdd):
3141         (WebCore::FloatPolygon::containsNonZero):
3142         (WebCore::FloatPolygon::contains):
3143         * platform/graphics/FloatPolygon.h:
3144         * rendering/shapes/PolygonShape.cpp:
3145         (WebCore::computeXIntersections):
3146
3147 2013-09-16  Andreas Kling  <akling@apple.com>
3148
3149         AXObjectCache::m_document should be a reference.
3150         <https://webkit.org/b/121425>
3151
3152         Reviewed by Antti Koivisto.
3153
3154         AXObjectCache is always owned by a Document so remove the uncertainty
3155         by turning its m_document into a Document&.
3156
3157 2013-09-16  Commit Queue  <commit-queue@webkit.org>
3158
3159         Unreviewed, rolling out r155851.
3160         http://trac.webkit.org/changeset/155851
3161         https://bugs.webkit.org/show_bug.cgi?id=121429
3162
3163         checkbox states should be exposed through AtkState, not
3164         AtkValue (Requested by msanchez on #webkit).
3165
3166         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
3167         (webkitAccessibleValueGetCurrentValue):
3168         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3169         (getInterfaceMaskFromObject):
3170
3171 2013-09-16  Krzysztof Czech  <k.czech@samsung.com>
3172
3173         [ATK] Extends atk value interface to return proper checkbox states
3174         https://bugs.webkit.org/show_bug.cgi?id=121413
3175
3176         Reviewed by Mario Sanchez Prada.
3177
3178         Tests: accessibility/mixed-checkbox.html
3179                accessibility/native-vs-nonnative-checkboxes.html
3180
3181         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
3182         (webkitAccessibleValueValueForAccessibilityObject):
3183         (webkitAccessibleValueGetCurrentValue):
3184         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3185         (getInterfaceMaskFromObject):
3186
3187 2013-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3188
3189         [GTK] Check DOM bindings API compatibility while building
3190         https://bugs.webkit.org/show_bug.cgi?id=101224
3191
3192         Reviewed by Gustavo Noronha Silva.
3193
3194         A .symbols file is now generated for every DOM binding public API
3195         object. It contains the signature of all public methods. We keep a
3196         single file with the signature of all public methods in the source
3197         tree. When DOM bindings are generated, a new symbols file is
3198         created concatenating all .symbols files generated and it's
3199         compared with the symbols file in the source tree using a script
3200         that checks if the changes are API compatible or not. In case of
3201         API break the build finishes showing the differences found in the
3202         symbol files. If API compatible changes are found, the diff is
3203         shown in stdout, suggesting to run the gobject-run-api-break-test
3204         with the --reset-results option to update the symbols file, and
3205         the build continues. If there aren't API changes the build
3206         continues silently.
3207
3208         * GNUmakefile.am:
3209         * bindings/gobject/GNUmakefile.am:
3210         * bindings/gobject/WebKitDOMCustom.symbols: Added.
3211         * bindings/gobject/WebKitDOMEventTarget.symbols: Added.
3212         * bindings/gobject/WebKitDOMObject.symbols: Added.
3213         * bindings/gobject/webkitdom.symbols: Added.
3214         * bindings/scripts/CodeGeneratorGObject.pm:
3215         (GenerateFunction):
3216         (WriteData):
3217         * bindings/scripts/gobject-run-api-break-test: Added.
3218         (check_api):
3219
3220 2013-09-16  Andreas Kling  <akling@apple.com>
3221
3222         Devirtualize Document::detach().
3223         <https://webkit.org/b/121418>
3224
3225         Reviewed by Antti Koivisto.
3226
3227         The only override was in PluginDocument which needs to decouple itself
3228         from the plugin element at the start of detach.
3229
3230         Added PluginDocument::detachFromPluginElement() and call it from detach().
3231
3232 2013-09-15  Andreas Kling  <akling@apple.com>
3233
3234         CTTE: RenderCombineText always has a Text node.
3235         <https://webkit.org/b/121411>
3236
3237         Reviewed by Antti Koivisto.
3238
3239         This renderer is never anonymous and always has a corresponding Text node.
3240         Replaced node() with a textNode() reference getter.
3241
3242 2013-09-15  Andreas Kling  <akling@apple.com>
3243
3244         CTTE: RenderSVGInlineText always has a Text node.
3245         <https://webkit.org/b/121409>
3246
3247         Reviewed by Antti Koivisto.
3248
3249         This renderer is never anonymous and always has a corresponding Text node.
3250         Replaced node() with a textNode() reference getter.
3251
3252         Only one null check was harmed in the making of this patch.
3253
3254 2013-09-15  Darin Adler  <darin@apple.com>
3255
3256         Try to fix the Windows build.
3257
3258         * dom/make_names.pl: The static_cast here was running into const-correctness
3259         issues, so for now change it back to a C-style cast.
3260
3261 2013-09-15  Santosh Mahto  <santosh.ma@samsung.com>
3262
3263         Adding "explicit" keyword in rendering related constructors
3264         https://bugs.webkit.org/show_bug.cgi?id=121398
3265
3266         Reviewed by Andreas Kling.
3267
3268         Adding explicit in below constructor.
3269         All files belong to Source/WebCore/rendering/ path.
3270
3271         * rendering/AutoTableLayout.h:
3272         * rendering/ClipPathOperation.h:
3273         (WebCore::ClipPathOperation::ClipPathOperation):
3274         (WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
3275         * rendering/FixedTableLayout.h:
3276         * rendering/FloatingObjects.h:
3277         (WebCore::FloatingObject::FloatingObject):
3278         * rendering/FlowThreadController.h:
3279         * rendering/HitTestResult.h:
3280         * rendering/ImageQualityController.h:
3281         * rendering/InlineBox.h:
3282         (WebCore::InlineBox::InlineBox):
3283         (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
3284         * rendering/InlineFlowBox.h:
3285         (WebCore::InlineFlowBox::InlineFlowBox):
3286         * rendering/InlineTextBox.h:
3287         (WebCore::InlineTextBox::InlineTextBox):
3288         * rendering/LayoutState.h:
3289         * rendering/LogicalSelectionOffsetCaches.h:
3290         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
3291         * rendering/RenderBoxModelObject.h:
3292         * rendering/RenderFlexibleBox.h:
3293         * rendering/RenderFrameSet.h:
3294         (WebCore::FrameEdgeInfo::FrameEdgeInfo):
3295         * rendering/RenderGeometryMap.h:
3296         * rendering/RenderImage.h:
3297         * rendering/RenderImageResourceStyleImage.h:
3298         * rendering/RenderLayerFilterInfo.h:
3299         * rendering/RenderMultiColumnSet.h:
3300         * rendering/RenderNamedFlowThread.h:
3301         * rendering/RenderReplaced.h:
3302         * rendering/RenderSearchField.h:
3303         * rendering/RenderSelectionInfo.h:
3304         (WebCore::RenderSelectionInfoBase::RenderSelectionInfoBase):
3305         (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
3306         * rendering/RenderTableSection.h:
3307         * rendering/RenderTextControl.h:
3308         * rendering/RenderTextControlSingleLine.h:
3309         * rendering/TrailingFloatsRootInlineBox.h:
3310
3311 2013-09-15  Gustavo Noronha Silva  <gns@gnome.org>
3312
3313         Unreviewed make distcheck fix.
3314
3315         * GNUmakefile.am:
3316         * GNUmakefile.list.am:
3317
3318 2013-09-15  Patrick Gansterer  <paroga@webkit.org>
3319
3320         [WIN] Fix build without precompiled header after r154146.
3321
3322         * platform/win/WebCoreBundleWin.h:
3323
3324 2013-09-15  Andreas Kling  <akling@apple.com>
3325
3326         CTTE: EllipsisBox owner renderer is always a RenderBlock.
3327         <https://webkit.org/b/121402>
3328
3329         Reviewed by Antti Koivisto.
3330
3331         Let the constructor reflect this. Also out-of-line it because reasons.
3332
3333 2013-09-15  Sam Weinig  <sam@webkit.org>
3334
3335         CTTE: RenderObject's createAnonymous() and setDocumentForAnonymous() should take Document references
3336         https://bugs.webkit.org/show_bug.cgi?id=121400
3337
3338         Reviewed by Andreas Kling.
3339
3340         The Document used for anonymous renderers is never null.
3341
3342         * dom/Document.cpp:
3343         * page/FrameView.cpp:
3344         * rendering/FlowThreadController.cpp:
3345         * rendering/RenderBlock.cpp:
3346         * rendering/RenderBlock.h:
3347         * rendering/RenderFlexibleBox.cpp:
3348         * rendering/RenderFlexibleBox.h:
3349         * rendering/RenderFullScreen.cpp:
3350         * rendering/RenderFullScreen.h:
3351         * rendering/RenderImage.cpp:
3352         * rendering/RenderInline.cpp:
3353         * rendering/RenderInline.h:
3354         * rendering/RenderLayer.cpp:
3355         * rendering/RenderListMarker.cpp:
3356         * rendering/RenderMultiColumnBlock.cpp:
3357         * rendering/RenderMultiColumnFlowThread.cpp:
3358         * rendering/RenderMultiColumnFlowThread.h:
3359         * rendering/RenderMultiColumnSet.cpp:
3360         * rendering/RenderMultiColumnSet.h:
3361         * rendering/RenderNamedFlowThread.cpp:
3362         * rendering/RenderNamedFlowThread.h:
3363         * rendering/RenderObject.h:
3364         * rendering/RenderReplica.cpp:
3365         * rendering/RenderReplica.h:
3366         * rendering/RenderRuby.cpp:
3367         * rendering/RenderRubyBase.cpp:
3368         * rendering/RenderRubyBase.h:
3369         * rendering/RenderRubyRun.cpp:
3370         * rendering/RenderScrollbar.cpp:
3371         * rendering/RenderScrollbarPart.cpp:
3372         * rendering/RenderScrollbarPart.h:
3373         * rendering/RenderTable.cpp:
3374         * rendering/RenderTableCell.cpp:
3375         * rendering/RenderTableCell.h:
3376         * rendering/RenderTableRow.cpp:
3377         * rendering/RenderTableRow.h:
3378         * rendering/RenderTableSection.cpp:
3379         * rendering/RenderText.cpp:
3380         * rendering/RenderView.cpp:
3381         * rendering/RenderView.h:
3382         * rendering/mathml/RenderMathMLBlock.cpp:
3383         * rendering/mathml/RenderMathMLRow.cpp:
3384         * rendering/mathml/RenderMathMLScripts.cpp:
3385
3386 2013-09-15  Sam Weinig  <sam@webkit.org>
3387
3388         CTTE: ContentData::createRenderer() should take references
3389         https://bugs.webkit.org/show_bug.cgi?id=121399
3390
3391         Reviewed by Andreas Kling.
3392
3393         - Convert createRenderer(Document*, RenderStyle*) to createRenderer(Document&, RenderStyle&)
3394         - Do a drive by final-ing of ContentData derived classes.
3395
3396         * dom/PseudoElement.cpp:
3397         (WebCore::PseudoElement::didAttachRenderers):
3398         * rendering/RenderImage.cpp:
3399         (WebCore::RenderImage::createAnonymous):
3400         * rendering/RenderImage.h:
3401         * rendering/style/ContentData.cpp:
3402         (WebCore::ImageContentData::createRenderer):
3403         (WebCore::TextContentData::createRenderer):
3404         (WebCore::CounterContentData::createRenderer):
3405         (WebCore::QuoteContentData::createRenderer):
3406         * rendering/style/ContentData.h:
3407
3408 2013-09-15  Andreas Kling  <akling@apple.com>
3409
3410         CTTE: RenderFrameSet is never anonymous.
3411         <https://webkit.org/b/121396>
3412
3413         Reviewed by Antti Koivisto.
3414
3415         This renderer is never anonymous, and always has a corresponding HTMLFrameSetElement.
3416         Replaced element() with a frameSetElement().
3417
3418 2013-09-15  Sam Weinig  <sam@webkit.org>
3419
3420         CTTE: Node subclasses should take a Document by reference in their constructor (Part 10)
3421         https://bugs.webkit.org/show_bug.cgi?id=121397
3422
3423         Reviewed by Andreas Kling.
3424
3425         Convert the bindings code to pass a Document reference for named constructors.
3426
3427         * bindings/js/JSImageConstructor.cpp:
3428         (WebCore::constructImage):
3429         * bindings/scripts/CodeGeneratorJS.pm:
3430         (GenerateConstructorDefinition):
3431         * html/HTMLAudioElement.cpp:
3432         (WebCore::HTMLAudioElement::createForJSConstructor):
3433         * html/HTMLAudioElement.h:
3434         * html/HTMLImageElement.cpp:
3435         (WebCore::HTMLImageElement::createForJSConstructor):
3436         * html/HTMLImageElement.h:
3437         * html/HTMLOptionElement.cpp:
3438         (WebCore::HTMLOptionElement::createForJSConstructor):
3439         * html/HTMLOptionElement.h:
3440
3441 2013-09-15  Sam Weinig  <sam@webkit.org>
3442
3443         CTTE: Node subclasses should take a Document by reference in their constructor (Part 9)
3444         https://bugs.webkit.org/show_bug.cgi?id=121394
3445
3446         Reviewed by Andreas Kling.
3447
3448         Remove the 'constructorTakesDocumentReference' property. It is the default now.
3449
3450         * dom/make_names.pl:
3451         Always use a Document reference.
3452
3453         * html/HTMLTagNames.in:
3454         * mathml/mathtags.in:
3455         * svg/svgtags.in:
3456         Remove the 'constructorTakesDocumentReference' property.
3457
3458 2013-09-15  Andreas Kling  <akling@apple.com>
3459
3460         RenderWidget doesn't need to cache a FrameView pointer.
3461         <https://webkit.org/b/121158>
3462
3463         Reviewed by Antti Koivisto.
3464
3465         The FrameView can be found through RenderObject::view().frameView().
3466         This way also gets you a reference, so no need for null-checking.
3467
3468 2013-09-15  Sam Weinig  <sam@webkit.org>
3469
3470         CTTE: Node subclasses should take a Document by reference in their constructor (Part 8)
3471         https://bugs.webkit.org/show_bug.cgi?id=121393
3472
3473         Reviewed by Andreas Kling.
3474
3475         Converts the following to take a Document reference:
3476             - All of SVG
3477
3478 2013-09-15  Sam Weinig  <sam@webkit.org>
3479
3480         [CTTE] Node subclasses should take a Document by reference in their constructor (Part 7)
3481         https://bugs.webkit.org/show_bug.cgi?id=121389
3482
3483         Reviewed by Andreas Kling.
3484
3485         Converts the following to take a Document reference:
3486             - Element
3487             - MathMLElement
3488             - MathMLInlineContainerElement
3489             - MathMLMathElement
3490             - MathMLTextElement
3491
3492 2013-09-15  Andreas Kling  <akling@apple.com>
3493
3494         CTTE: RenderMedia and RenderVideo are never anonymous.
3495         <https://webkit.org/b/121388>
3496
3497         Reviewed by Sam Weinig.
3498
3499         Codify the following:
3500
3501         - RenderMedia always has an HTMLMediaElement.
3502         - RenderVideo always has an HTMLVideoElement.
3503
3504         None of these renderers are ever anonymous, so delete element() and provide
3505         strongly typed reference getters instead.
3506
3507 2013-09-15  Andreas Kling  <akling@apple.com>
3508
3509         Unreviewed, rolling out r155809.
3510         http://trac.webkit.org/changeset/155809
3511         https://bugs.webkit.org/show_bug.cgi?id=121388
3512
3513         Accidentally removed files, let's redo this.
3514
3515 2013-09-15  Andreas Kling  <akling@apple.com>
3516
3517         CTTE: RenderMedia and RenderVideo are never anonymous.
3518         <https://webkit.org/b/121388>
3519
3520         Reviewed by Sam Weinig.
3521
3522         Codify the following:
3523
3524         - RenderMedia always has an HTMLMediaElement.
3525         - RenderVideo always has an HTMLVideoElement.
3526
3527         None of these renderers are ever anonymous, so delete element() and provide
3528         strongly typed reference getters instead.
3529
3530 2013-09-15  Sam Weinig  <sam@webkit.org>
3531
3532         [CTTE] Node subclasses should take a Document by reference in their constructor (Part 6)
3533         https://bugs.webkit.org/show_bug.cgi?id=121387
3534
3535         Reviewed by Andreas Kling.
3536
3537         Converts the following to take a Document reference:
3538             - Attr
3539             - CDATASection
3540             - CharacterData
3541             - Comment
3542             - DOMImplementation
3543             - DocumentFragment
3544             - DocumentType
3545             - EntityReference
3546             - Notation
3547             - ProcessingInstruction
3548             - ShadowRoot
3549             - TemplateContentDocumentFragment
3550             - Text
3551
3552 2013-09-15  Andreas Kling  <akling@apple.com>
3553
3554         Remove RenderObject::clearNode().
3555         <https://webkit.org/b/121386>
3556
3557         Reviewed by Anders Carlsson.
3558
3559         This was used by ref-counted RenderWidgets after getting removed from their
3560         parent renderer but kept alive by an external ref. We have no need for this
3561         awkward state anymore, so remove clearNode().
3562
3563 2013-09-15  Andreas Kling  <akling@apple.com>
3564
3565         CTTE: RenderWidgets are never anonymous.
3566         <https://webkit.org/b/121385>
3567
3568         Reviewed by Anders Carlsson.
3569
3570         Codify the following:
3571
3572         - RenderWidget always has an HTMLFrameOwnerElement.
3573         - RenderEmbeddedObject always has an HTMLFrameOwnerElement.
3574         - RenderSnapshottedPlugIn always has an HTMLPlugInImageElement.
3575         - RenderFrame always has an HTMLFrameElement.
3576         - RenderIFrame always has an HTMLIFrameElement.
3577
3578         None of these renderers are ever anonymous, so delete element() and provide
3579         strongly typed reference getters instead.
3580
3581 2013-09-14  Darin Adler  <darin@apple.com>
3582
3583         Use FINAL instead of virtualChildren trick in render tree classes
3584         https://bugs.webkit.org/show_bug.cgi?id=121373
3585
3586         Reviewed by Andreas Kling.
3587
3588         * rendering/RenderBlock.cpp:
3589         (WebCore::RenderBlock::updateFirstLetterStyle): Use children instead of
3590         virtualChildren.
3591         * rendering/RenderBox.cpp:
3592         (WebCore::RenderBox::splitAnonymousBoxesAroundChild): Ditto.
3593         * rendering/RenderBoxModelObject.cpp:
3594         (WebCore::RenderBoxModelObject::moveChildTo): Ditto.
3595         * rendering/RenderObject.cpp:
3596         (WebCore::RenderObject::addChild): Ditto.
3597         (WebCore::RenderObject::removeChild): Ditto.
3598         (WebCore::RenderObject::handleDynamicFloatPositionChange): Ditto.
3599         (WebCore::RenderObject::willBeDestroyed): Ditto.
3600         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive): Ditto.
3601
3602         * rendering/RenderBlock.h: Changed firstChild and lastChild to use
3603         m_children directly instead of a function. Made the children function
3604         a final virtual override. Deleted the virtualChildren override. Added
3605         override keywords to other virtual functions.
3606         * rendering/RenderEmbeddedObject.h: Ditto.
3607         * rendering/RenderFrameSet.h: Ditto.
3608         * rendering/RenderInline.h: Ditto.
3609         * rendering/RenderMedia.h: Ditto.
3610         * rendering/RenderTableCol.h: Ditto.
3611         * rendering/RenderTableRow.h: Ditto.
3612         * rendering/RenderTableSection.h: Ditto.
3613         * rendering/svg/RenderSVGContainer.h: Ditto.
3614         * rendering/svg/RenderSVGRoot.h: Ditto.
3615
3616         * rendering/RenderObject.h:
3617         (WebCore::RenderObject::firstChild): Use children instead of virtualChildren.
3618         (WebCore::RenderObject::lastChild): Ditto.
3619         (WebCore::RenderObject::children): Renamed from virtualChildren.
3620         (WebCore::RenderObject::canHaveChildren): Use children instead of virtualChildren.
3621
3622 2013-09-15  Darin Adler  <darin@apple.com>
3623
3624         Shrink factory functions
3625         https://bugs.webkit.org/show_bug.cgi?id=121378
3626
3627         Reviewed by Andreas Kling.
3628
3629         This makes the functions that builds four different types of per-element tables
3630         all have smaller code size.
3631
3632         * DerivedSources.make: Tweaked how HTML and SVG wrapper factories are made a bit.
3633         It was OK, but a little sloppy.
3634
3635         * dom/Document.cpp:
3636         (WebCore::Document::createElement): Changed to call the createElement functions
3637         in the factories. Also did some style improvement.
3638
3639         * dom/make_names.pl:
3640         (printConstructorSignature): Make constructors take a Document& instead of
3641         a Document*.
3642         (printConstructorInterior): Updated for Document& instead of Document*.
3643         (printFunctionTable): Renamed from printFunctionInits, because this now
3644         creates table entries. The actual code to add each function is now done
3645         in a loop instead.
3646         (printNamesHeaderFile): Made the table const.
3647         (printNamesCppFile): Made the table const.
3648         (printDefinitions): Generate a table, table entries, and a loop that calls
3649         createQualifiedName, rather than an "unrolled loop".
3650         (printFactoryCppFile): Tweaked indentation. Updated to take Document& instead
3651         of Document*. Generate a table, table entries, and a loop that builds a map,
3652         rather than an "unrolled" loop.
3653         (printFactoryHeaderFile): Eliminated the unused createElement member function
3654         that was part of a dream of factory objects in a namespace registry, giving
3655         the name createElement to the static member function so it would be less
3656         redundant. Also made the function takes a Document& instead of Document*.
3657         Also made the default "not created by parser", since the parser is the simpler
3658         use case, outnumbered by the non-parser uses, at least at the moment. Also,
3659         use nullptr instead of 0.
3660         (printWrapperFactoryCppFile): Generate a table, table entries, and a loop
3661         that builds a map rather than an "unrolled" loop.
3662
3663         * editing/htmlediting.cpp:
3664         (WebCore::createHTMLElement): Put the null check here that used to be in
3665         HTMLElementFactory::createElement, and call with a reference instead of a
3666         pointer. Also don't need to pass "0, false" since "not created by the parser"
3667         is now the default.
3668         * html/HTMLDocument.cpp:
3669         (WebCore::HTMLDocument::createElement): Ditto.
3670
3671         * html/HTMLElement.cpp:
3672         (WebCore::populateEventNameForAttributeLocalNameMap): Changed to use an
3673         AtomicStringImpl* as the key instead of AtomicString, since all the strings
3674         come from the local names of tags, and so don't need to be ref'd. This saves
3675         a bit of reference count churn when building the map and is the same pattern
3676         used in some maps in the make_names.pl script above.
3677         (WebCore::HTMLElement::parseAttribute): Updated for change above.
3678
3679         * html/HTMLObjectElement.cpp:
3680         (WebCore::isRecognizedTagName): More const.
3681
3682         * html/parser/HTMLConstructionSite.cpp:
3683         (WebCore::HTMLConstructionSite::createHTMLElement): Changed to call the
3684         HTMLElementFactory::createElement function under its new name with a reference
3685         rather than a pointer.
3686
3687         * html/parser/HTMLIdentifier.cpp:
3688         (WebCore::nameForIndex): More const.
3689         (WebCore::HTMLIdentifier::addNames): More const.
3690
3691         * html/parser/HTMLTreeBuilder.cpp:
3692         (WebCore::mapLoweredLocalNameToName): More const.
3693         (WebCore::adjustSVGTagNameCase): Eliminated local variable so we would not have
3694         to utter type with more const.
3695         (WebCore::adjustAttributes): Ditto.
3696         (WebCore::addNamesWithPrefix): More const. Also tweaked to use a bit more reference,
3697         and a bit less pointer. Also used array instead of pointer for argument since they
3698         are synonyms and this use is more array-like and const array is slightly easier to
3699         understand than the double const pointer.
3700         (WebCore::adjustForeignAttributes): Eliminated local variable so we would not have
3701         to utter type with more const.
3702
3703         * html/track/TextTrackCue.cpp:
3704         (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): Pass a reference to
3705         WebVTTElement::createEquivalentHTMLElement.
3706
3707         * html/track/WebVTTElement.cpp:
3708         (WebCore::WebVTTElement::WebVTTElement): Take a reference instead of a pointer.
3709         (WebCore::WebVTTElement::create): Ditto.
3710         (WebCore::WebVTTElement::cloneElementWithoutAttributesAndChildren): Pass a
3711         reference instead of a pointer to create.
3712         (WebCore::WebVTTElement::createEquivalentHTMLElement): Take a reference instead
3713         of a pointer, and update uses of HTMLElementFactory::createElement. Also made
3714         this return null when a bad node type is passed in, which should never happen.
3715
3716         * html/track/WebVTTElement.h: Use Document& instead of Document*. Removed unused
3717         and undefined create/constructor overloads.
3718
3719         * html/track/WebVTTParser.cpp:
3720         (WebCore::WebVTTParser::constructTreeFromToken): Pass document reference rather than
3721         pointer to WebVTTElement::create.
3722
3723 2013-09-15  Andreas Kling  <akling@apple.com>
3724
3725         Get rid of ref-counting on RenderArena.
3726         <https://webkit.org/b/121379>
3727
3728         Reviewed by Darin Adler.
3729
3730         This was used to guard the arena during ref-counted RenderWidget teardown.
3731
3732 2013-09-15  Darin Adler  <darin@apple.com>
3733
3734         Fix Qt build.
3735
3736         * css/CSSSelector.cpp:
3737         (WebCore::populatePseudoTypeByNameMap): Removed stray line that was breaking
3738         the build for any platform with !ENABLE(VIDEO_TRACK).
3739
3740 2013-09-15  Andreas Kling  <akling@apple.com>
3741
3742         Restore two-pass mechanism for FrameView::updateEmbeddedObjects().
3743         <https://webkit.org/b/121380>
3744
3745         Reviewed by Darin Adler.
3746
3747         Restore the code to make a second pass over the embedded objects needing
3748         an update in case more objects were added to the set during the first pass.
3749
3750 2013-09-15  Frédéric Wang  <fred.wang@free.fr>
3751
3752         Implement the mmultiscripts tag
3753         https://bugs.webkit.org/show_bug.cgi?id=99618
3754
3755         Reviewed by Chris Fleizach.
3756
3757         Tests: mathml/invalid-scripts-crash.html
3758                mathml/presentation/multiscripts-equivalence.html
3759                mathml/presentation/multiscripts-noscripts.html
3760                mathml/presentation/multiscripts-positions.html
3761                mathml/presentation/scripts-base-alignment.html
3762                mathml/presentation/scripts-horizontal-alignment.html
3763                mathml/presentation/scripts-vertical-alignment.html
3764                mathml/scripts-addChild.html
3765                mathml/scripts-removeChild.html
3766
3767         This relies on the existing msub/msup/msubsup code to implement the mmultiscripts tag. This also improves dynamic addition/removal of children for these MathML elements and adds a specific style for invalid children, so that they render like an merror tag. Finally, this fixes a bad memory access in the Accessibility render object of msubsup.
3768
3769         * CMakeLists.txt:
3770         * GNUmakefile.list.am:
3771         * Target.pri:
3772         * WebCore.vcxproj/WebCore.vcxproj:
3773         * WebCore.vcxproj/WebCore.vcxproj.filters:
3774         * WebCore.xcodeproj/project.pbxproj:
3775         * accessibility/AccessibilityRenderObject.cpp:
3776         (WebCore::AccessibilityRenderObject::isMathSubscriptSuperscript):
3777         (WebCore::AccessibilityRenderObject::mathSuperscriptObject):
3778         * css/mathml.css:
3779         (mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot):
3780         (mover > :last-child, munderover > :last-child):
3781         (msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + *):
3782         (merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ *):
3783         * mathml/MathMLInlineContainerElement.cpp:
3784         (WebCore::MathMLInlineContainerElement::createRenderer):
3785         * mathml/mathtags.in:
3786         * rendering/mathml/RenderMathMLBlock.h:
3787         (WebCore::RenderMathMLBlock::isRenderMathMLScripts):
3788         (WebCore::RenderMathMLBlock::isRenderMathMLScriptsWrapper):
3789         * rendering/mathml/RenderMathMLScripts.cpp: Added.
3790         (WebCore::isMPrescripts):
3791         (WebCore::RenderMathMLScripts::RenderMathMLScripts):
3792         (WebCore::RenderMathMLScripts::base):
3793         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
3794         (WebCore::RenderMathMLScripts::fixAnonymousStyles):
3795         (WebCore::RenderMathMLScripts::addChildInternal):
3796         (WebCore::RenderMathMLScripts::removeChildInternal):
3797         (WebCore::RenderMathMLScripts::addChild):
3798         (WebCore::RenderMathMLScripts::removeChild):
3799         (WebCore::RenderMathMLScripts::styleDidChange):
3800         (WebCore::RenderMathMLScripts::unembellishedOperator):
3801         (WebCore::RenderMathMLScripts::layout):
3802         (WebCore::RenderMathMLScripts::firstLineBoxBaseline):
3803         (WebCore::RenderMathMLScriptsWrapper::createAnonymousWrapper):
3804         (WebCore::RenderMathMLScriptsWrapper::addChildInternal):
3805         (WebCore::RenderMathMLScriptsWrapper::addChild):
3806         (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
3807         (WebCore::RenderMathMLScriptsWrapper::removeChild):
3808         * rendering/mathml/RenderMathMLScripts.h: Added.
3809         (WebCore::RenderMathMLScriptsWrapper::RenderMathMLScriptsWrapper):
3810         (WebCore::RenderMathMLScriptsWrapper::renderName):
3811         (WebCore::RenderMathMLScriptsWrapper::isRenderMathMLScriptsWrapper):
3812         (WebCore::toRenderMathMLScriptsWrapper):
3813         (WebCore::RenderMathMLScripts::isRenderMathMLScripts):
3814         (WebCore::RenderMathMLScripts::renderName):
3815         (WebCore::toRenderMathMLScripts):
3816         * rendering/mathml/RenderMathMLSubSup.cpp: Removed.
3817         * rendering/mathml/RenderMathMLSubSup.h: Removed.
3818
3819 2013-09-15  Andreas Kling  <akling@apple.com>
3820
3821         Get rid of ref-counting on RenderWidget.
3822         <https://webkit.org/b/121357>
3823
3824         Reviewed by Darin Adler.
3825
3826         Instead of RenderView tracking RenderWidgets, have FrameView track Widgets
3827         that are currently in the render tree.
3828
3829         To protect ourselves during NPAPI tomfoolery, we now let RenderWidget hand
3830         out weak pointers through a createWeakPtr() method so call sites can monitor
3831         the renderer for deletion without having to take shared ownership.
3832
3833         This works out quite nicely since instead of keeping a limping object alive
3834         for a little longer just so we can call methods on it (to accomplish nothing),
3835         we're forced to check right away if it's gone, and take immediate action.
3836
3837         De-virtualized RenderObject::destroy() since it's no longer needed for
3838         RenderWidget to defer destruction.
3839
3840         * page/FrameView.cpp:
3841         (WebCore::FrameView::layout):
3842         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
3843
3844             Call updateWidgetPositions() on FrameView instead of RenderView.
3845
3846         (WebCore::FrameView::updateEmbeddedObject):
3847
3848             Turn null checking of embedded object's element backpointer into an
3849             assertion. This will eventually go away completely once that renderer
3850             can return a HTMLFrameOwnerElement&.
3851
3852             Use WeakPtr to check for renderer destruction following the call out
3853             to updateWidget().
3854
3855         (WebCore::FrameView::updateEmbeddedObjects):
3856
3857             Slap a WidgetHierarchyUpdatesSuspensionScope guard on this function
3858             to defer Widget updates until all the updateEmbeddedObject calls are
3859             done. This avoids RenderWidget::setWidget() having to handle 'this'
3860             disappearing from underneath.
3861
3862             Also use a ListHashSet with a null sentinel to avoid looping forever.
3863
3864         (WebCore::FrameView::performPostLayoutTasks):
3865
3866             Only call updateEmbeddedObjects() once since that function no longer
3867             operates in chunks.
3868
3869         (WebCore::FrameView::notifyWidgetsInAllFrames):
3870
3871             Call notifyWidgets() on FrameView instead of RenderView.
3872
3873         (WebCore::FrameView::didAddWidgetToRenderTree):
3874         (WebCore::FrameView::willRemoveWidgetFromRenderTree):
3875
3876             Added. These are called by RenderWidget when a Widget is being
3877             added or removed from a RenderWidget.
3878
3879         (WebCore::collectWidgets):
3880
3881             Helper to collect raw Widget pointers into a Vector and ref them.
3882
3883         (WebCore::FrameView::updateWidgetPositions):
3884
3885             Moved here from RenderView. This function holds a ref on all the
3886             attached Widgets and calls RenderWidget::updateWidgetPosition() on
3887             their corresponding renderers.
3888
3889         (WebCore::FrameView::notifyWidgets):
3890
3891             Moved here from RenderView. Holds a ref on all the widgets while
3892             calling Widget::notifyWidget() on each one.
3893
3894         * rendering/RenderLayer.cpp:
3895         (WebCore::RenderLayer::scrollTo):
3896
3897             Call updateWidgetPositions() on FrameView instead of RenderView.
3898
3899         * rendering/RenderObject.h:
3900
3901             De-virtualized destroy().
3902
3903         * rendering/RenderView.cpp:
3904         * rendering/RenderView.h:
3905
3906             Moved a bunch of things to FrameView. Made protected section private
3907             since nothing inherits from RenderView.
3908
3909         * rendering/RenderWidget.h:
3910         (WebCore::RenderWidget::createWeakPtr):
3911
3912             Added a WeakPtr factory for clients that want to monitor this object
3913             for destruction.
3914             
3915         * rendering/RenderWidget.cpp:
3916         (WebCore::RenderWidget::RenderWidget):
3917         (WebCore::RenderWidget::willBeDestroyed):
3918         (WebCore::RenderWidget::~RenderWidget):
3919
3920             Removed ref counting.
3921             Removed registration with RenderView in ctor/willBeDestroyed.
3922
3923         (WebCore::RenderWidget::setWidgetGeometry):
3924
3925             Monitor the RenderWidget itself through a WeakPtr and check on it
3926             after each step that we're still alive. In that case just bail out.
3927
3928         (WebCore::RenderWidget::setWidget):
3929
3930             Register the incoming/outgoing Widget with the FrameView.
3931             Use a WeakPtr to check on 'this' after updateWidgetGeometry().
3932
3933         (WebCore::RenderWidget::updateWidgetPosition):
3934
3935             Use a WeakPtr to check on 'this' after updateWidgetGeometry().
3936
3937         * GNUmakefile.list.am:
3938         * rendering/RenderWidgetProtector.h:
3939
3940             Removed.
3941
3942
3943 2013-09-14  Sam Weinig  <sam@webkit.org>
3944
3945         [CTTE] Node subclasses should take a Document by reference in their constructor (Part 5)
3946         https://bugs.webkit.org/show_bug.cgi?id=121375
3947
3948         Reviewed by Andreas Kling.
3949
3950         * dom/make_names.pl:
3951         Add support for a top level 'constructorTakesDocumentReference' property to
3952         force using a Document reference for the whole factory.
3953
3954         * html/HTMLTagNames.in:
3955         Replace per-tag 'constructorTakesDocumentReference' with a top level declaration
3956         now that all of the HTML tag names are supported.
3957
3958         Converts the following to take a Document reference:
3959             - HTMLContentElement
3960             - HTMLElement
3961             - HTMLFrameElementBase
3962             - HTMLFrameOwnerElement
3963             - HTMLPlugInElement
3964             - HTMLPlugInImageElement
3965             - HTMLUnknownElement
3966             - InsertionPoint
3967             - StyledElement
3968             - TextTrackCueBox
3969             - TextTrackCueGenericBoxElement
3970
3971 2013-09-14  Eric Carlson  <eric.carlson@apple.com>
3972
3973         MediaStream API: Update RTCDataChannel
3974         https://bugs.webkit.org/show_bug.cgi?id=121102
3975
3976         Reviewed by Sam Weinig.
3977
3978         Based on https://chromium.googlesource.com/chromium/blink/+/c6975c41956acded7cf0363012d7d6b69d0c6d96,
3979         and https://chromium.googlesource.com/chromium/blink/+/214dab0bd6385f573c918ba5ce58a5aa206ce186.
3980
3981         No new tests, existing tests updated.
3982
3983         * Modules/mediastream/RTCDataChannel.cpp:
3984         (WebCore::RTCDataChannel::create): Take an options Dictionary.
3985         (WebCore::RTCDataChannel::didChangeReadyState): String -> AtomicString. Early return if the
3986             state hasn't changed.
3987         (WebCore::RTCDataChannel::binaryType): String -> AtomicString.
3988         (WebCore::RTCDataChannel::setBinaryType): String -> AtomicString.
3989         * Modules/mediastream/RTCDataChannel.h:
3990         * Modules/mediastream/RTCDataChannel.idl:
3991
3992         * Modules/mediastream/RTCPeerConnection.cpp:
3993         (WebCore::RTCPeerConnection::createDataChannel): Take an options struct.
3994         * platform/mediastream/RTCDataChannelHandler.h:
3995
3996         * platform/mediastream/RTCPeerConnectionHandler.h:
3997         (WebCore::RTCDataChannelInit::RTCDataChannelInit): Take an options struct.
3998
3999 2013-09-14  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
4000
4001         MediaStream API: Update RTCDataChannel to match the specification
4002         https://bugs.webkit.org/show_bug.cgi?id=120889
4003
4004         Reviewed by Eric Carlson
4005
4006         Merged from https://chromium.googlesource.com/chromium/blink/+/c3862b0a83e20fc8b1f770c7e4a886a7cceb80d2
4007         by Tommy Widenflycht.
4008
4009         According to WebRTC specification, RTCDataChannel must have the following new attributes:
4010         boolean ordered
4011         unsigned short maxRetransmitTime
4012         unsigned short maxRetransmits
4013         DOMString protocol
4014         boolean negotiated
4015         unsigned short id
4016
4017         and the following one was deprecated:
4018         boolean reliable
4019
4020         Test updates will be landed with https://webkit.org/b/121102.
4021
4022         * Modules/mediastream/RTCDataChannel.cpp:
4023         (WebCore::RTCDataChannel::ordered):
4024         (WebCore::RTCDataChannel::maxRetransmitTime):
4025         (WebCore::RTCDataChannel::maxRetransmits):
4026         (WebCore::RTCDataChannel::protocol):
4027         (WebCore::RTCDataChannel::negotiated):
4028         (WebCore::RTCDataChannel::id):
4029         * Modules/mediastream/RTCDataChannel.h:
4030         * Modules/mediastream/RTCDataChannel.idl:
4031         * platform/mediastream/RTCDataChannelHandler.h:
4032
4033 2013-09-14  Sam Weinig  <sam@webkit.org>
4034
4035         [CTTE] Node subclasses should take a Document by reference in their constructor (Part 4)
4036         https://bugs.webkit.org/show_bug.cgi?id=121372
4037
4038         Reviewed by Eric Carlson.
4039
4040         Converts the following to take a Document reference:
4041             - HTMLFormControlElement
4042             - HTMLFormControlElementWithState
4043             - HTMLMapElement
4044             - HTMLMarqueeElement
4045             - HTMLMediaElement
4046             - HTMLMenuElement
4047             - HTMLMetaElement
4048             - HTMLMeterElement
4049             - HTMLOListElement
4050             - HTMLObjectElement
4051             - HTMLOptGroupElement
4052             - HTMLOptionElement
4053             - HTMLOutputElement
4054             - HTMLParagraphElement
4055             - HTMLParamElement
4056             - HTMLProgressElement
4057             - HTMLScriptElement
4058             - HTMLSelectElement
4059             - HTMLSourceElement
4060             - HTMLSpanElement
4061             - HTMLStyleElement
4062             - HTMLSummaryElement
4063             - HTMLTableCellElement
4064             - HTMLTableElement
4065             - HTMLTableRowElement
4066             - HTMLTableSectionElement
4067             - HTMLTemplateElement
4068             - HTMLTextAreaElement
4069             - HTMLTextFormControlEleme