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