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