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