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