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