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