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