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