[Coordinated Graphics] Fix the build on MacOS 10.9
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-12  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2
3         [Coordinated Graphics] Fix the build on MacOS 10.9
4         https://bugs.webkit.org/show_bug.cgi?id=121225
5
6         Reviewed by Darin Adler.
7
8         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
9
10 2013-09-12  Mark Lam  <mark.lam@apple.com>
11
12         Change debug hooks to pass sourceID and position info via the DebuggerCallFrame.
13         https://bugs.webkit.org/show_bug.cgi?id=121214.
14
15         Reviewed by Geoffrey Garen.
16
17         No new tests.
18
19         Also changed the Inspector's JavaScriptCallFrame to get the sourceID and
20         position info from its DebuggerCallFrame instead of caching those values.
21
22         * bindings/js/JavaScriptCallFrame.cpp:
23         (WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
24         * bindings/js/JavaScriptCallFrame.h:
25         (WebCore::JavaScriptCallFrame::create):
26         (WebCore::JavaScriptCallFrame::invalidate):
27         (WebCore::JavaScriptCallFrame::sourceID):
28         (WebCore::JavaScriptCallFrame::position):
29         (WebCore::JavaScriptCallFrame::line):
30         (WebCore::JavaScriptCallFrame::column):
31         (WebCore::JavaScriptCallFrame::update):
32         * bindings/js/ScriptDebugServer.cpp:
33         (WebCore::ScriptDebugServer::createCallFrame):
34         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
35         (WebCore::ScriptDebugServer::callEvent):
36         (WebCore::ScriptDebugServer::atStatement):
37         (WebCore::ScriptDebugServer::returnEvent):
38         (WebCore::ScriptDebugServer::exception):
39         (WebCore::ScriptDebugServer::willExecuteProgram):
40         (WebCore::ScriptDebugServer::didExecuteProgram):
41         (WebCore::ScriptDebugServer::didReachBreakpoint):
42         * bindings/js/ScriptDebugServer.h:
43         * bindings/js/WorkerScriptDebugServer.cpp:
44         (WebCore::WorkerScriptDebugServer::willExecuteProgram):
45         * bindings/js/WorkerScriptDebugServer.h:
46
47 2013-09-12  peavo@outlook.com  <peavo@outlook.com>
48
49         [WinCairo] Compile errors, missing include.
50         https://bugs.webkit.org/show_bug.cgi?id=121222
51
52         Reviewed by Brent Fulgham.
53
54         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Include required header.
55         * platform/win/DragImageCairoWin.cpp: Include required header.
56
57 2013-09-12  Vivek Galatage  <vivek.vg@samsung.com>
58
59         XMLSerializer.serializeToString() should throw exception for invalid node value.
60         https://bugs.webkit.org/show_bug.cgi?id=121209
61
62         Reviewed by Darin Adler.
63
64         FF and Opera 12 (pre blink/webkit) throw exception in case the node value is invalid.
65         Blink sends an empty string as the result of serializeToString operation with invalid node.
66         We should match with other browsers for throwing it as an exception.
67
68         Blink review URL: https://chromiumcodereview.appspot.com/23532055/
69
70         Test: fast/dom/xmlserializer-serialize-to-string-exception.html
71
72         * xml/XMLSerializer.cpp:
73         (WebCore::XMLSerializer::serializeToString):
74
75 2013-09-12  Zalan Bujtas  <zalan@apple.com>
76
77         Crash in ScrollingStateStickyNode::updateConstraints
78         https://bugs.webkit.org/show_bug.cgi?id=119638
79
80         Reviewed by Simon Fraser.
81
82         Ensure when a scrolling state node is removed from the state tree,
83         we remove both the current node and all its children from the
84         associated m_stateNodeMap lookup table.
85
86         Test: fast/css/sticky/multiple-layers-sticky-crash.html
87
88         * page/scrolling/ScrollingStateNode.cpp:
89         (WebCore::ScrollingStateNode::removeChild):
90         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
91         * page/scrolling/ScrollingStateNode.h:
92
93 2013-09-12  Zalan Bujtas  <zalan@apple.com>
94
95         REGRESSION (r132516): Javascript menu text incorrectly disappearing and reappearing
96         https://bugs.webkit.org/show_bug.cgi?id=101047
97
98         Reviewed by Simon Fraser.
99
100         Compositing layers keep track of ancestors' clipping by constructing the RenderLayerBacking::m_ancestorClippingLayer.
101         It helps setting up the proper clipping context for the corresponding graphics layer.
102         When a RenderObject's clipping style changes, it needs to propagate this change not only
103         to the associated RenderLayer, but also to the descendants', if applicable.
104         Before r132516, it was mainly covered by initiating full style recalcs, which ensured that
105         style recalc on the descendant rendering tree took care of creating/destroying
106         RenderLayerBacking::m_ancestorClippingLayer at every compositing layer node. Without the full
107         recalc, the clipping of the compositing render layers and the corresponding render subtrees can get out of sync.
108         This patch updates the clipping context on the descendant subtree, when the clipping behaviour
109         changes on a render node.
110
111         Tests: compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html
112                compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html
113
114         * rendering/RenderLayer.cpp:
115         (WebCore::RenderLayer::updateDescendantClippingContext):
116         (WebCore::RenderLayer::styleChanged):
117         * rendering/RenderLayer.h:
118         * rendering/RenderLayerBacking.cpp:
119         (WebCore::RenderLayerBacking::~RenderLayerBacking):
120         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
121         (WebCore::RenderLayerBacking::updateAncestorClippingLayer):
122         (WebCore::RenderLayerBacking::updateDescendantClippingLayer):
123         * rendering/RenderLayerBacking.h:
124
125 2013-09-12  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
126
127         Remove home-brewed nullptr
128         https://bugs.webkit.org/show_bug.cgi?id=119624
129
130         Reviewed by Anders Carlsson.
131
132         The standard C++11 nullptr and std::nullptr_t type should be used now.
133
134         * bindings/js/JSDOMBinding.h:
135
136 2013-09-12  Samuel White  <samuel_white@apple.com>
137
138         <meter> element text value exposed as AXTitle; should be exposing AXValueDescription
139         https://bugs.webkit.org/show_bug.cgi?id=117651
140
141         Reviewed by Mario Sanchez Prada.
142
143         No new tests, updated accessibility/meter-element to handle platform specific output.
144
145         * accessibility/AccessibilityObject.cpp:
146         (WebCore::AccessibilityObject::isMeter):
147         * accessibility/AccessibilityObject.h:
148         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
149         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
150
151 2013-09-12  Santosh Mahto  <santosh.ma@samsung.com>
152
153         class WeekInputType invokes wrong constructor
154         https://bugs.webkit.org/show_bug.cgi?id=120768
155
156         Reviewed by Andreas Kling.
157
158         Correcting wrong constuctor invocation.
159
160         * html/WeekInputType.h:
161         (WebCore::WeekInputType::WeekInputType):
162
163 2013-09-12  Samuel White  <samuel_white@apple.com>
164
165         AX: Self-referencing aria-labelledby only uses contents.
166         https://bugs.webkit.org/show_bug.cgi?id=120814
167
168         Reviewed by Mario Sanchez Prada.
169
170         Implemented additional 'Text Alternative Computation' steps documented at:
171         http://www.w3.org/WAI/PF/aria/complete#textalternativecomputation. This allows us to remove
172         our raw text node iteration that was previously forcing us to do our computation incorrectly.
173         Element content is now sourced using textUnderElement (step 2C of the computation).
174
175         Test: accessibility/self-referencing-aria-labelledby.html
176
177         * accessibility/AccessibilityNodeObject.cpp:
178         (WebCore::accessibleNameForNode):
179         (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
180
181 2013-09-12  Commit Queue  <commit-queue@webkit.org>
182
183         Unreviewed, rolling out r155597.
184         http://trac.webkit.org/changeset/155597
185         https://bugs.webkit.org/show_bug.cgi?id=121220
186
187         broke windows build because there's no ews :( (Requested by
188         thorton on #webkit).
189
190         * WebCore.exp.in:
191         * platform/graphics/BitmapImage.cpp:
192         (WebCore::BitmapImage::isBitmapImage):
193         * platform/graphics/BitmapImage.h:
194         (WebCore::BitmapImage::create):
195         * platform/graphics/CrossfadeGeneratedImage.cpp:
196         (WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
197         (WebCore::CrossfadeGeneratedImage::drawPattern):
198         * platform/graphics/CrossfadeGeneratedImage.h:
199         (WebCore::CrossfadeGeneratedImage::setContainerSize):
200         (WebCore::CrossfadeGeneratedImage::usesContainerSize):
201         (WebCore::CrossfadeGeneratedImage::hasRelativeWidth):
202         (WebCore::CrossfadeGeneratedImage::hasRelativeHeight):
203         (WebCore::CrossfadeGeneratedImage::size):
204         * platform/graphics/GeneratedImage.h:
205         (WebCore::GeneratedImage::hasSingleSecurityOrigin):
206         (WebCore::GeneratedImage::setContainerSize):
207         (WebCore::GeneratedImage::usesContainerSize):
208         (WebCore::GeneratedImage::hasRelativeWidth):
209         (WebCore::GeneratedImage::hasRelativeHeight):
210         (WebCore::GeneratedImage::size):
211         (WebCore::GeneratedImage::destroyDecodedData):
212         (WebCore::GeneratedImage::decodedSize):
213         * platform/graphics/GeneratorGeneratedImage.cpp:
214         (WebCore::GeneratorGeneratedImage::draw):
215         (WebCore::GeneratorGeneratedImage::drawPattern):
216         * platform/graphics/GeneratorGeneratedImage.h:
217         (WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
218         * svg/graphics/SVGImage.h:
219         (WebCore::SVGImage::isSVGImage):
220         (WebCore::SVGImage::usesContainerSize):
221         (WebCore::SVGImage::destroyDecodedData):
222         (WebCore::SVGImage::decodedSize):
223         * svg/graphics/SVGImageForContainer.h:
224         (WebCore::SVGImageForContainer::destroyDecodedData):
225         (WebCore::SVGImageForContainer::decodedSize):
226
227 2013-09-12  Andreas Kling  <akling@apple.com>
228
229         RenderWidget elements are always HTMLFrameOwnerElement subclasses.
230         <https://webkit.org/b/121217>
231
232         Reviewed by Antti Koivisto.
233
234         Make RenderWidget constructor take HTMLFrameOwnerElement* and update subclasses
235         with even tighter types where possible.
236
237         Also added RenderWidget::frameOwnerElement() and deleted element().
238         Removed a handful of unnecessary type checks that were exposed by this.
239
240 2013-09-11  Tim Horton  <timothy_horton@apple.com>
241
242         Apply OVERRIDE and FINAL to Image subclasses and clean them up
243         https://bugs.webkit.org/show_bug.cgi?id=121086
244
245         Reviewed by Alexey Proskuryakov.
246
247         Everything other than the copious application of OVERRIDE and FINAL
248         is explicitly called out below.
249
250         * WebCore.exp.in:
251         Export the correct version of getCGImageRef for use by WebKit2.
252
253         * platform/graphics/BitmapImage.cpp:
254         * platform/graphics/BitmapImage.h:
255         Drive-by inline isBitmapImage.
256         Move create(HBITMAP) to be near the other create() functions.
257         Move all of the members and quite a few functions from protected to private.
258         Devirtualize frameCount().
259         Move notSolidColor() near the other solid color functions.
260
261         * platform/graphics/CrossfadeGeneratedImage.cpp:
262         (WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
263         (WebCore::CrossfadeGeneratedImage::drawPattern):
264         * platform/graphics/GeneratorGeneratedImage.cpp:
265         (WebCore::GeneratorGeneratedImage::draw):
266         (WebCore::GeneratorGeneratedImage::drawPattern):
267         Use size() and setContainerSize() instead of directly accessing a
268         superclass' (now private, previously protected) members.
269
270         * platform/graphics/CrossfadeGeneratedImage.h:
271         * platform/graphics/GeneratedImage.h:
272         Make m_size private, I don't think we do protected members.
273         
274         * platform/graphics/GeneratorGeneratedImage.h:
275         Make all the members private.
276
277         * svg/graphics/SVGImage.h:
278         * svg/graphics/SVGImageForContainer.h:
279
280 2013-09-11  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
281
282         Canvas fillText and measureText handle ideographic spaces differently
283         https://bugs.webkit.org/show_bug.cgi?id=108881
284
285         Reviewed by Darin Adler.
286
287         According to spec for text preparation algorithm
288         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm
289         all the space characters mentioned in the spec
290         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character
291         should be replaced by U+0020 space character.
292         The canvas functions fillText and measureText should run the text preparation algorithm.
293         This patch modifies the canvas functions drawTextInternal and measureText to conform to the above spec.
294
295         Tests: fast/canvas/canvas-measureText-ideographicSpace.html
296
297         * html/canvas/CanvasRenderingContext2D.cpp:
298         (WebCore::shouldSpaceBeReplaced):
299         (WebCore::replaceCharacterInString):
300         (WebCore::CanvasRenderingContext2D::measureText):
301         (WebCore::CanvasRenderingContext2D::drawTextInternal):
302
303 2013-09-11  Andreas Kling  <akling@apple.com>
304
305         Fix Windows build.
306
307         * rendering/RenderingAllInOne.cpp:
308
309 2013-09-11  Andreas Kling  <akling@apple.com>
310
311         Merge RenderPart into RenderWidget.
312         <https://webkit.org/b/121200>
313
314         Reviewed by Anders Carlsson.
315
316         Remove the RenderPart class and move its functionality into RenderWidget.
317         It was acting as a pointless extra layer between RenderWidget and renderers
318         for embedded objects, frames and iframes.
319
320 2013-09-11  Geoffrey Garen  <ggaren@apple.com>
321
322         Removed some unused functions from the debugger interface
323         https://bugs.webkit.org/show_bug.cgi?id=121194
324
325         Reviewed by Joseph Pecoraro.
326
327         We plan to use the "evaluate" API and debugger activation property access for all the features we need.
328
329         * inspector/JavaScriptCallFrame.idl: These are the interfaces I removed.
330
331         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
332         * inspector/InjectedScript.cpp:
333         * inspector/InjectedScript.h:
334         * inspector/InjectedScriptSource.js:
335         * inspector/Inspector.json:
336         * inspector/InspectorDebuggerAgent.cpp:
337         (WebCore::InspectorDebuggerAgent::setScriptSource):
338         * inspector/InspectorDebuggerAgent.h:
339         * inspector/JavaScriptCallFrame.idl:
340         * inspector/front-end/RemoteObject.js:
341         (WebInspector.RemoteObject.prototype.):
342         (WebInspector.RemoteObject.prototype.setPropertyValue): These files are mechanical removals of code that used
343         or implemented the interfaces I removed.
344
345 2013-09-11  Vivek Galatage  <vivek.vg@samsung.com>
346
347         DOMParser.parseFromString() should support creating HTML Document with mime-type text/html
348         https://bugs.webkit.org/show_bug.cgi?id=120826
349
350         Reviewed by Darin Adler.
351
352         The specification http://domparsing.spec.whatwg.org/#the-domparser-interface for DOMParser.parseFromString()
353         allows the document creation if the mimeType is one of the supported types:
354         ["text/html", "text/xml", "application/xml", "application/xhtml+xml", "image/svg+xml"]
355
356         Also script elements get marked unexecutable and the contents of noscript get parsed as markup.
357
358         blink review URL: https://codereview.chromium.org/23903014/
359
360         Test: fast/dom/domparser-parsefromstring-mimetype-support.html
361
362         * xml/DOMParser.cpp:
363         (WebCore::DOMParser::parseFromString):
364
365 2013-09-11  Hans Muller  <hmuller@adobe.com>
366
367         [CSS Shapes] Improve the performance of image valued shapes
368         https://bugs.webkit.org/show_bug.cgi?id=120211
369
370         Reviewed by Alexandru Chiculita.
371
372         Replaced the implementation of RasterShapeIntervals with one based on the
373         new ShapeInterval<int> class. This eliminates the dependency the Region class
374         and delivers a 10X layout speedup for large image valued shapes.
375
376         This a just an implementation refactoring, no new tests were needed.
377
378         * rendering/shapes/RasterShape.cpp:
379         (WebCore::RasterShapeIntervals::appendInterval): Renamed this method, it was called addInterval().
380         (WebCore::shapeIntervalsContain):
381         (WebCore::RasterShapeIntervals::contains):
382         (WebCore::RasterShapeIntervals::getIntervalsInLine):
383         (WebCore::compareX1):
384         (WebCore::RasterShapeIntervals::firstIncludedIntervalY):
385         (WebCore::RasterShapeIntervals::getIncludedIntervals):
386         (WebCore::RasterShapeIntervals::getExcludedIntervals):
387         (WebCore::RasterShape::getExcludedIntervals):
388         (WebCore::RasterShape::getIncludedIntervals):
389         * rendering/shapes/RasterShape.h:
390         (WebCore::RasterShapeIntervals::RasterShapeIntervals): The constructor now takes a size argument which is used to allocate IntShapeIntervals storage.
391         (WebCore::RasterShapeIntervals::size):
392         (WebCore::RasterShapeIntervals::bounds):
393         (WebCore::RasterShapeIntervals::isEmpty):
394         (WebCore::RasterShapeIntervals::getIntervals):
395         * rendering/shapes/Shape.cpp:
396         (WebCore::Shape::createShape): Use appendInterval() instead of addInterval() (see above) and the new RasterShapeIntervals constructor.
397
398 2013-09-11  Eric Carlson  <eric.carlson@apple.com>
399
400         [MediaStream API] Updating NavigatorUserMediaError to match the spec
401         https://bugs.webkit.org/show_bug.cgi?id=120880
402
403         Reviewed by Darin Adler.
404         
405         Merge https://chromium.googlesource.com/chromium/blink/+/f07305e49ddebaa166f5dee514bcc881a8efd341
406         by Tommy Widenflycht.
407
408         The Blink change did not have any test changes because they don't appear to have any tests 
409         for NavigatorUserMediaError. I can't add tests now because the MediaStream feature isn't enabled 
410         yet, so https://bugs.webkit.org/show_bug.cgi?id=121182 tracks adding tests.
411
412         * Modules/mediastream/NavigatorUserMediaError.h:
413         (WebCore::NavigatorUserMediaError::create):
414         (WebCore::NavigatorUserMediaError::name):
415         (WebCore::NavigatorUserMediaError::message):
416         (WebCore::NavigatorUserMediaError::constraintName):
417         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
418         * Modules/mediastream/NavigatorUserMediaError.idl:
419         * Modules/mediastream/UserMediaRequest.cpp:
420         (WebCore::UserMediaRequest::fail):
421         (WebCore::UserMediaRequest::failConstraint):
422         * Modules/mediastream/UserMediaRequest.h:
423
424 2013-09-11  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
425
426         MediaStream API: Remove LocalMediaStream
427         https://bugs.webkit.org/show_bug.cgi?id=120875
428
429         blink merge: https://chromium.googlesource.com/chromium/blink/+/81643ee3fe048a64fa8931132e1294fa2c8e821a
430
431         Reviewed by Eric Carlson.
432
433         Existing tests were updated.
434
435         * CMakeLists.txt:
436         * DerivedSources.make:
437         * GNUmakefile.list.am:
438         * Modules/mediastream/LocalMediaStream.cpp: Removed.
439         * Modules/mediastream/LocalMediaStream.h: Removed.
440         * Modules/mediastream/LocalMediaStream.idl: Removed.
441         * Modules/mediastream/MediaStream.cpp:
442         (WebCore::MediaStream::stop):
443         * Modules/mediastream/MediaStream.h:
444         * Modules/mediastream/MediaStream.idl:
445         * Modules/mediastream/NavigatorUserMediaSuccessCallback.h:
446         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
447         * Modules/mediastream/UserMediaRequest.cpp:
448         (WebCore::UserMediaRequest::succeed):
449         * Modules/mediastream/UserMediaRequest.h:
450         * Modules/webaudio/AudioContext.cpp:
451         (WebCore::AudioContext::createMediaStreamSource):
452         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
453         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
454         * WebCore.xcodeproj/project.pbxproj:
455         * dom/EventTarget.h:
456         * dom/EventTargetFactory.in:
457         * platform/mediastream/MediaStreamDescriptor.h:
458
459 2013-09-11  Timothy Hatcher  <timothy@apple.com>
460
461         Remove PlatformInstrumentation since we don't show decode or resize in the new Web Inspector
462         https://bugs.webkit.org/show_bug.cgi?id=121181
463
464         Reviewed by Joseph Pecoraro.
465
466         * CMakeLists.txt:
467         * GNUmakefile.list.am:
468         * Target.pri:
469         * WebCore.order:
470         * WebCore.vcxproj/WebCore.vcxproj:
471         * WebCore.vcxproj/WebCore.vcxproj.filters:
472         * WebCore.xcodeproj/project.pbxproj:
473         * inspector/InspectorTimelineAgent.cpp:
474         (WebCore::InspectorTimelineAgent::willPaint):
475         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
476         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
477         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
478         (WebCore::InspectorTimelineAgent::clearRecordStack):
479         * inspector/InspectorTimelineAgent.h:
480         * platform/PlatformInstrumentation.cpp: Removed.
481         * platform/PlatformInstrumentation.h: Removed.
482         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
483         (WebCore::BMPImageDecoder::frameBufferAtIndex):
484         * platform/image-decoders/gif/GIFImageDecoder.cpp:
485         (WebCore::GIFImageDecoder::frameBufferAtIndex):
486         * platform/image-decoders/ico/ICOImageDecoder.cpp:
487         (WebCore::ICOImageDecoder::frameBufferAtIndex):
488         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
489         (WebCore::JPEGImageDecoder::frameBufferAtIndex):
490         * platform/image-decoders/png/PNGImageDecoder.cpp:
491         (WebCore::PNGImageDecoder::frameBufferAtIndex):
492         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
493         (WebCore::WEBPImageDecoder::frameBufferAtIndex):
494
495 2013-09-11  Brent Fulgham  <bfulgham@apple.com>
496
497         [Windows] Avoid converting from IntSize->SIZE->IntSize.
498         https://bugs.webkit.org/show_bug.cgi?id=121180
499
500         Reviewed by Anders Carlsson.
501
502         * platform/graphics/BitmapImage.h: Take const IntSize* as
503         argument, rather than LPSIZE.
504         * platform/graphics/Image.h: Ditto.
505         (WebCore::Image::getHBITMAPOfSize):
506         * platform/graphics/win/ImageCGWin.cpp:
507         (WebCore::BitmapImage::getHBITMAPOfSize): Use passed-in
508         IntSize, rather than converting from SIZE.
509         * platform/graphics/win/ImageCairoWin.cpp:
510         (WebCore::BitmapImage::getHBITMAPOfSize): Ditto.
511
512 2013-09-11  Zoltan Horvath  <zoltan@webkit.org>
513
514         Unreviewed debug build fix after r155567.
515
516         * rendering/LineWidth.cpp:
517         (WebCore::LineWidth::LineWidth):
518
519 2013-09-11  Zoltan Horvath  <zoltan@webkit.org>
520
521         Move LineWidth out of RenderBlockLineLayout
522         https://bugs.webkit.org/show_bug.cgi?id=121107
523
524         Reviewed by David Hyatt.
525
526         Move LineWidth class and related code into LineWidth.{h,cpp}.
527
528         No new tests, no behavior change.
529
530         * CMakeLists.txt:
531         * GNUmakefile.list.am:
532         * Target.pri:
533         * WebCore.vcxproj/WebCore.vcxproj:
534         * WebCore.xcodeproj/project.pbxproj:
535         * rendering/LineWidth.cpp: Added.
536         (WebCore::LineWidth::applyOverhang):
537         (WebCore::LineWidth::fitBelowFloats):
538         * rendering/LineWidth.h: Added.
539         (WebCore::logicalHeightForLine):
540         (WebCore::LineWidth::LineWidth):
541         (WebCore::LineWidth::fitsOnLine):
542         (WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
543         (WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
544         (WebCore::LineWidth::currentWidth):
545         (WebCore::LineWidth::uncommittedWidth):
546         (WebCore::LineWidth::committedWidth):
547         (WebCore::LineWidth::availableWidth):
548         (WebCore::LineWidth::addUncommittedWidth):
549         (WebCore::LineWidth::commit):
550         (WebCore::LineWidth::setTrailingWhitespaceWidth):
551         (WebCore::LineWidth::shouldIndentText):
552         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
553         (WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
554         (WebCore::LineWidth::updateAvailableWidth):
555         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
556         * rendering/RenderBlockLineLayout.cpp:
557
558 2013-09-11  Ryosuke Niwa  <rniwa@webkit.org>
559
560         HTMLEntityTable could use char to reduce binary size
561         https://bugs.webkit.org/show_bug.cgi?id=121176
562
563         Reviewed by Anders Carlsson.
564
565         Use LChar instead.
566
567         * html/parser/HTMLEntityParser.cpp:
568         (WebCore::HTMLEntityParser::consumeNamedEntity):
569         * html/parser/HTMLEntityTable.h:
570         (WebCore::HTMLEntityTableEntry::lastCharacter):
571         * html/parser/create-html-entity-table:
572
573 2013-09-11  Brent Fulgham  <bfulgham@apple.com>
574
575         [Windows] Revise GDI Create Functions to use GDIObject Smart Pointer.
576         https://bugs.webkit.org/show_bug.cgi?id=121100
577
578         Reviewed by Anders Carlsson.
579
580         * platform/graphics/FontPlatformData.h: Use GDIObject instead of bare pointer.
581         * platform/graphics/win/FontCacheWin.cpp:
582         (WebCore::createGDIFont): No longer need to leak the pointer; use move semantic
583         to pass ownership to FontPlatformData.
584         (WebCore::FontCache::createFontPlatformData):
585         * platform/graphics/win/FontCustomPlatformData.cpp:
586         (WebCore::FontCustomPlatformData::fontPlatformData): Use move operation.
587         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
588         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
589         * platform/graphics/win/FontPlatformDataCGWin.cpp:
590         (WebCore::FontPlatformData::FontPlatformData): Ditto.
591         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
592         (WebCore::FontPlatformData::FontPlatformData): Ditto.
593         * platform/graphics/win/FontPlatformDataWin.cpp:
594         (WebCore::FontPlatformData::FontPlatformData): Ditto.
595         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
596         (WebCore::GlyphPage::fill): Use HWndDC smart pointer instead of bare HDC.
597         * platform/graphics/win/SimpleFontDataWin.cpp:
598         (WebCore::SimpleFontData::platformCreateScaledFontData): Use move operation.
599         * platform/win/DragImageCGWin.cpp:
600         (WebCore::allocImage): Change to use GDIObject.
601         (WebCore::scaleDragImage): Use smart pointers to avoid manual deallocs.
602         (WebCore::createDragImageFromImage): Ditto.
603         * platform/win/DragImageCairoWin.cpp:
604         (WebCore::allocImage): Change to use GDIObject.
605         (WebCore::scaleDragImage): Use smart pointers to avoid manual deallocs.
606         (WebCore::createDragImageFromImage): Ditto.
607         * platform/win/DragImageWin.cpp:
608         (WebCore::createDragImageForLink): Update for GDIObject.
609         * platform/win/PopupMenuWin.cpp:
610         (WebCore::PopupMenuWin::PopupMenuWin): Switch to GDIObject.
611         (WebCore::PopupMenuWin::~PopupMenuWin): Remove uneeded deallocs.
612         (WebCore::PopupMenuWin::paint): Update for GDIObject.
613         * platform/win/PopupMenuWin.h: Use smart pointers instead of bare GDI objects.
614
615 2013-09-11  Patrick Gansterer  <paroga@webkit.org>
616
617         Fix animations with !USE(ACCELERATED_COMPOSITING) after r147792.
618         https://bugs.webkit.org/show_bug.cgi?id=121159
619
620         Reviewed by Simon Fraser.
621
622         CSSPropertyAnimation::blendProperties() is available always
623         and needs to be called to make the animations work.
624
625         * page/animation/ImplicitAnimation.cpp:
626         (WebCore::ImplicitAnimation::animate):
627         * page/animation/KeyframeAnimation.cpp:
628         (WebCore::KeyframeAnimation::animate):
629
630 2013-09-11  David Hyatt  <hyatt@apple.com>
631
632         Move all collapsing margin code out of RenderBlock and into RenderBlockFlow.
633         https://bugs.webkit.org/show_bug.cgi?id=121049
634
635         Reviewed by Dean Jackson.
636
637         This patch begins the migration of the rare data struct of RenderBlock into
638         RenderBlockFlow. During this process we will temporarily have rare data structs
639         in both places, but ultimately all of the members are going to move down into
640         RenderBlockFlow, and if any don't, they will get forced into a hash.
641         
642         For this patch, the margin information is being shifted out of RenderBlock and into
643         RenderBlockFlow. Any functions that refer to MarginValues or to MarginInfo also got
644         moved down into RenderBlockFlow. Most of block child layout is now in RenderBlockFlow
645         after this patch.
646         
647         Note that in many cases the code didn't simply move. There is some type tightening
648         that happened as well, i.e., places that look for RenderBlock can now look for
649         RenderBlockFlow instead and let RenderBlock execute the base RenderBox functions.
650
651         * rendering/RenderBlock.cpp:
652         (WebCore::RenderBlock::RenderBlock):
653         (WebCore::RenderBlock::setPaginationStrut):
654         (WebCore::RenderBlock::setPageLogicalOffset):
655         (WebCore::RenderBlock::setBreakAtLineToAvoidWidow):
656         * rendering/RenderBlock.h:
657         (WebCore::RenderBlock::setLineGridBox):
658         (WebCore::RenderBlock::setShapeInsideInfo):
659         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
660         * rendering/RenderBlockFlow.cpp:
661         (WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
662         (WebCore::RenderBlockFlow::RenderBlockFlow):
663         (WebCore::RenderBlockFlow::layoutBlockChild):
664         (WebCore::RenderBlockFlow::adjustPositionedBlock):
665         (WebCore::RenderBlockFlow::adjustFloatingBlock):
666         (WebCore::RenderBlockFlow::marginValuesForChild):
667         (WebCore::RenderBlockFlow::collapseMargins):
668         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
669         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
670         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
671         (WebCore::RenderBlockFlow::setCollapsedBottomMargin):
672         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
673         (WebCore::RenderBlockFlow::setMaxMarginBeforeValues):
674         (WebCore::RenderBlockFlow::setMaxMarginAfterValues):
675         (WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
676         (WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
677         (WebCore::RenderBlockFlow::mustDiscardMarginBefore):
678         (WebCore::RenderBlockFlow::mustDiscardMarginAfter):
679         (WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild):
680         (WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild):
681         (WebCore::RenderBlockFlow::mustSeparateMarginBeforeForChild):
682         (WebCore::RenderBlockFlow::mustSeparateMarginAfterForChild):
683         (WebCore::inNormalFlow):
684         (WebCore::RenderBlockFlow::applyBeforeBreak):
685         (WebCore::RenderBlockFlow::applyAfterBreak):
686         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
687         * rendering/RenderBlockFlow.h:
688         (WebCore::RenderBlockFlow::MarginValues::MarginValues):
689         (WebCore::RenderBlockFlow::MarginValues::positiveMarginBefore):
690         (WebCore::RenderBlockFlow::MarginValues::negativeMarginBefore):
691         (WebCore::RenderBlockFlow::MarginValues::positiveMarginAfter):
692         (WebCore::RenderBlockFlow::MarginValues::negativeMarginAfter):
693         (WebCore::RenderBlockFlow::MarginValues::setPositiveMarginBefore):
694         (WebCore::RenderBlockFlow::MarginValues::setNegativeMarginBefore):
695         (WebCore::RenderBlockFlow::MarginValues::setPositiveMarginAfter):
696         (WebCore::RenderBlockFlow::MarginValues::setNegativeMarginAfter):
697         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
698         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::positiveMarginBeforeDefault):
699         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::negativeMarginBeforeDefault):
700         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::positiveMarginAfterDefault):
701         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::negativeMarginAfterDefault):
702         (WebCore::RenderBlockFlow::MarginInfo::setAtBeforeSideOfBlock):
703         (WebCore::RenderBlockFlow::MarginInfo::setAtAfterSideOfBlock):
704         (WebCore::RenderBlockFlow::MarginInfo::clearMargin):
705         (WebCore::RenderBlockFlow::MarginInfo::setHasMarginBeforeQuirk):
706         (WebCore::RenderBlockFlow::MarginInfo::setHasMarginAfterQuirk):
707         (WebCore::RenderBlockFlow::MarginInfo::setDeterminedMarginBeforeQuirk):
708         (WebCore::RenderBlockFlow::MarginInfo::setPositiveMargin):
709         (WebCore::RenderBlockFlow::MarginInfo::setNegativeMargin):
710         (WebCore::RenderBlockFlow::MarginInfo::setPositiveMarginIfLarger):
711         (WebCore::RenderBlockFlow::MarginInfo::setNegativeMarginIfLarger):
712         (WebCore::RenderBlockFlow::MarginInfo::setMargin):
713         (WebCore::RenderBlockFlow::MarginInfo::setCanCollapseMarginAfterWithChildren):
714         (WebCore::RenderBlockFlow::MarginInfo::setDiscardMargin):
715         (WebCore::RenderBlockFlow::MarginInfo::atBeforeSideOfBlock):
716         (WebCore::RenderBlockFlow::MarginInfo::canCollapseWithMarginBefore):
717         (WebCore::RenderBlockFlow::MarginInfo::canCollapseWithMarginAfter):
718         (WebCore::RenderBlockFlow::MarginInfo::canCollapseMarginBeforeWithChildren):
719         (WebCore::RenderBlockFlow::MarginInfo::canCollapseMarginAfterWithChildren):
720         (WebCore::RenderBlockFlow::MarginInfo::quirkContainer):
721         (WebCore::RenderBlockFlow::MarginInfo::determinedMarginBeforeQuirk):
722         (WebCore::RenderBlockFlow::MarginInfo::hasMarginBeforeQuirk):
723         (WebCore::RenderBlockFlow::MarginInfo::hasMarginAfterQuirk):
724         (WebCore::RenderBlockFlow::MarginInfo::positiveMargin):
725         (WebCore::RenderBlockFlow::MarginInfo::negativeMargin):
726         (WebCore::RenderBlockFlow::MarginInfo::discardMargin):
727         (WebCore::RenderBlockFlow::MarginInfo::margin):
728         (WebCore::RenderBlockFlow::maxPositiveMarginBefore):
729         (WebCore::RenderBlockFlow::maxNegativeMarginBefore):
730         (WebCore::RenderBlockFlow::maxPositiveMarginAfter):
731         (WebCore::RenderBlockFlow::maxNegativeMarginAfter):
732         (WebCore::RenderBlockFlow::initMaxMarginValues):
733         * rendering/RenderDeprecatedFlexibleBox.cpp:
734         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
735         * rendering/RenderTable.cpp:
736         (WebCore::RenderTable::layout):
737
738 2013-09-11  Myles C. Maxfield  <mmaxfield@apple.com>
739
740         Fix nested unicode-bidi: isolate
741         https://bugs.webkit.org/show_bug.cgi?id=120504
742
743         Reviewed by Darin Adler.
744
745         When we have a nested isolate renderer if the outer isolate has a text
746         and this text is not the first child, the isolated chain is not
747         rendered correctly. This happens because constructBidiRunsForSegment
748         uses always the first inner isolated renderer as isolated inline
749         container. This patch fixes the behavior described changing
750         containingIsolate to find the right isolated container.
751
752         Merged from Blink: https://chromium.googlesource.com/chromium/blink/+/840a57050eade39dd04dde0c6603e129b783151c
753
754         Tests: fast/text/international/unicode-bidi-isolate-nested-first-child-text.html
755                fast/text/international/unicode-bidi-isolate-nested-simple.html
756
757         * rendering/InlineIterator.h:
758         (WebCore::containingIsolate):
759         * rendering/RenderBlockLineLayout.cpp:
760         (WebCore::constructBidiRunsForSegment):
761
762 2013-09-11  Alexey Proskuryakov  <ap@apple.com>
763
764         https://bugs.webkit.org/show_bug.cgi?id=121169
765         media/track/track-cue-rendering-vertical.html is flaky on Mac
766
767         Reviewed by Eric Carlson.
768
769         * html/shadow/MediaControlElements.cpp:
770         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Added a FIXME.
771
772 2013-09-11  Anders Carlsson  <andersca@apple.com>
773
774         Stop using deleteAllValues in SVG code
775         https://bugs.webkit.org/show_bug.cgi?id=121172
776
777         Reviewed by Antti Koivisto.
778
779         Use OwnPtr for values instead.
780
781         * rendering/svg/RenderSVGResourceClipper.cpp:
782         (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper):
783         (WebCore::RenderSVGResourceClipper::removeAllClientsFromCache):
784         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
785         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
786         * rendering/svg/RenderSVGResourceClipper.h:
787         * rendering/svg/RenderSVGResourceFilter.cpp:
788         (WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter):
789         (WebCore::RenderSVGResourceFilter::removeAllClientsFromCache):
790         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
791         (WebCore::RenderSVGResourceFilter::applyResource):
792         (WebCore::RenderSVGResourceFilter::postApplyResource):
793         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
794         * rendering/svg/RenderSVGResourceFilter.h:
795         * rendering/svg/RenderSVGResourceMasker.cpp:
796         (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker):
797         (WebCore::RenderSVGResourceMasker::removeAllClientsFromCache):
798         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
799         (WebCore::RenderSVGResourceMasker::applyResource):
800         * rendering/svg/RenderSVGResourceMasker.h:
801
802 2013-09-11  Ryosuke Niwa  <rniwa@webkit.org>
803
804         Make the table static const.
805
806         * css/makeprop.pl:
807
808 2013-09-11  Timothy Hatcher  <timothy@apple.com>
809
810         Remove TimelineTraceEventProcessor since no current ports use it
811         https://bugs.webkit.org/show_bug.cgi?id=121171
812
813         Reviewed by Joseph Pecoraro.
814
815         * CMakeLists.txt:
816         * GNUmakefile.list.am:
817         * Target.pri:
818         * WebCore.vcxproj/WebCore.vcxproj:
819         * WebCore.vcxproj/WebCore.vcxproj.filters:
820         * WebCore.xcodeproj/project.pbxproj:
821         * inspector/InspectorAllInOne.cpp:
822         * inspector/InspectorClient.h:
823         * inspector/InspectorInstrumentation.cpp:
824         * inspector/InspectorInstrumentation.h:
825         * inspector/InspectorTimelineAgent.cpp:
826         (WebCore::InspectorTimelineAgent::start):
827         (WebCore::InspectorTimelineAgent::stop):
828         * inspector/InspectorTimelineAgent.h:
829         * inspector/TimelineTraceEventProcessor.cpp: Removed.
830         * inspector/TimelineTraceEventProcessor.h: Removed.
831
832 2013-09-11  Commit Queue  <commit-queue@webkit.org>
833
834         Unreviewed, rolling out r155519.
835         http://trac.webkit.org/changeset/155519
836         https://bugs.webkit.org/show_bug.cgi?id=121174
837
838         Included regression test fails, and an existing test started
839         to crash (Requested by ap on #webkit).
840
841         * dom/Document.cpp:
842         (WebCore::Document::hoveredElementDidDetach):
843         * page/EventHandler.cpp:
844         (WebCore::EventHandler::EventHandler):
845         (WebCore::EventHandler::clear):
846         (WebCore::EventHandler::handleMouseMoveEvent):
847         (WebCore::EventHandler::scheduleHoverStateUpdate):
848         (WebCore::EventHandler::hoverTimerFired):
849         * page/EventHandler.h:
850
851 2013-09-11  Anders Carlsson  <andersca@apple.com>
852
853         Stop using deleteAllValues in SVG code
854         https://bugs.webkit.org/show_bug.cgi?id=121172
855
856         Reviewed by Antti Koivisto.
857
858         Use OwnPtr for values instead.
859
860         * rendering/svg/RenderSVGResourceClipper.cpp:
861         (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper):
862         (WebCore::RenderSVGResourceClipper::removeAllClientsFromCache):
863         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
864         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
865         * rendering/svg/RenderSVGResourceClipper.h:
866         * rendering/svg/RenderSVGResourceFilter.cpp:
867         (WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter):
868         (WebCore::RenderSVGResourceFilter::removeAllClientsFromCache):
869         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
870         (WebCore::RenderSVGResourceFilter::applyResource):
871         (WebCore::RenderSVGResourceFilter::postApplyResource):
872         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
873         * rendering/svg/RenderSVGResourceFilter.h:
874         * rendering/svg/RenderSVGResourceMasker.cpp:
875         (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker):
876         (WebCore::RenderSVGResourceMasker::removeAllClientsFromCache):
877         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
878         (WebCore::RenderSVGResourceMasker::applyResource):
879         * rendering/svg/RenderSVGResourceMasker.h:
880
881 2013-09-10  Simon Fraser  <simon.fraser@apple.com>
882
883         REGRESSION (143483): overflow:hidden doesn't quash big repaints from text-indent: -9999px
884         https://bugs.webkit.org/show_bug.cgi?id=121137
885
886         Reviewed by Ryosuke Niwa.
887         
888         The change in r143483 made it so that negative text-indent gets added
889         to visual oveflow even when we have overflow:hidden, which is really bad
890         because it causes large repaints (and large layers) for a common-on-the-web
891         pattern.
892         
893         Revert the change, and add a new test to make sure it doesn't regress.
894         
895         I can't reproduce the bug it was trying to fix with the change reverted.
896
897         Tests: compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html
898                fast/repaint/negative-text-indent-with-overflow-hidden.html
899
900         * rendering/RenderBlock.cpp:
901         (WebCore::RenderBlock::computeOverflow):
902
903 2013-09-10  Simon Fraser  <simon.fraser@apple.com>
904
905         Optionally show visual and layout overflow rects in layer tree dumps
906         https://bugs.webkit.org/show_bug.cgi?id=121135
907
908         Reviewed by Beth Dakin.
909
910         When calling showLayerTree() from the debugger, show overflow rects
911         (visaul and layout) for renderers.
912         
913         Does not affect test output.
914
915         * rendering/RenderLayer.cpp:
916         (showLayerTree): Pass the new flag to show overflow rects.
917         * rendering/RenderTreeAsText.cpp:
918         (WebCore::RenderTreeAsText::writeRenderObject): Print the rects.
919         (WebCore::write): Don't force layout on subframes if the "dont' layout"
920         flag is set.
921         * rendering/RenderTreeAsText.h: New flag.
922
923 2013-09-11  Chris Fleizach  <cfleizach@apple.com>
924
925         AX: WebKit exposes AXTitleUIElement incorrectly on checkboxes and radio buttons
926         https://bugs.webkit.org/show_bug.cgi?id=121039
927
928         Reviewed by Sam Weinig.
929
930         Stop hiding <label> elements for radio buttons and checkboxes (and using the text inside them for the AXTitle).
931         Instead, expose the <label> element as the titleUIElement if appropriate for the input.
932
933         This implies:
934            1) The web will no longer match MacOS behavior exactly (the text and the checkbox control are combined on MacOS into one element)
935            2) But, the user will now be able to explore the <label> element which may include links or other important controls.
936         I think sacrificing 1) here is a good tradeoff. The user will likely never know the difference in terms of output.
937
938         Test: platform/mac/accessibility/label-elements-exposed-as-title-ui-elements.html
939
940         * accessibility/AccessibilityNodeObject.cpp:
941         (WebCore::AccessibilityNodeObject::titleElementText):
942         (WebCore::AccessibilityNodeObject::title):
943         * accessibility/AccessibilityRenderObject.cpp:
944         (WebCore::AccessibilityRenderObject::hasTextAlternative):
945         (WebCore::AccessibilityRenderObject::exposesTitleUIElement):
946
947 2013-09-11  Andreas Kling  <akling@apple.com>
948
949         Remove unnecessary Document::frame() null checks in rendererIsNeeded().
950         <https://webkit.org/b/121166>
951
952         Reviewed by Anders Carlsson.
953
954         rendererIsNeeded() is only called during style resolve, which only happens
955         while there's a Frame present.
956
957         * html/HTMLEmbedElement.cpp:
958         (WebCore::HTMLEmbedElement::rendererIsNeeded):
959         * html/HTMLMediaElement.cpp:
960         (WebCore::HTMLMediaElement::rendererIsNeeded):
961         * html/HTMLObjectElement.cpp:
962         * html/HTMLObjectElement.h:
963
964 2013-09-11  Csaba Osztrogon√°c  <ossy@webkit.org>
965
966         ARM buildfix after r155491
967         https://bugs.webkit.org/show_bug.cgi?id=121152
968
969         Reviewed by Anders Carlsson.
970
971         FELightingNEON.cpp and FELightingNEON.h is inside COMPILER(GCC) guard, so it's safe to use GCC attribute.
972
973         * platform/graphics/cpu/arm/filters/FELightingNEON.cpp: Use __aligned__ GCC attribute directly.
974         * platform/graphics/cpu/arm/filters/FELightingNEON.h: Use __aligned__ GCC attribute instead of ugly template magic.
975         (WebCore::FELighting::platformApplyNeon):
976
977 2013-09-11  peavo@outlook.com  <peavo@outlook.com>
978
979         [WinCairo] Compile errors.
980         https://bugs.webkit.org/show_bug.cgi?id=121153
981
982         Reviewed by Brent Fulgham.
983
984         * page/win/FrameCairoWin.cpp:
985         (WebCore::imageFromRect): Return empty GDIObject.
986         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
987         (WebCore::FontCustomPlatformData::fontPlatformData): Get actual handle from GDIObject.
988
989 2013-09-11  Darin Adler  <darin@apple.com>
990
991         Rework CSS parser, eliminating "floating" concept and using %destructor
992         https://bugs.webkit.org/show_bug.cgi?id=121161
993
994         Reviewed by Antti Koivisto.
995
996         This is some basic improvement, but there is still room for a lot more
997         consistent approach and formatting in this file. There is a mix of code that
998         works by side effects in the CSSParser class and code that works with the
999         values that bison generates in the union that is more or less random. And
1000         the data structures seem too costly, with too much heap allocation. And the
1001         CSSParser class has grown massive, with a mix of both function for use by
1002         code that wants to trigger parsing, and helper functions called by code in
1003         the grammar file. All of that can benefit from more refinement in the future.
1004
1005         * css/CSSGrammar.y.in: Made some incremental improvements to the structure
1006         of the grammar file, including:
1007         - Breaking up the %union so types are declared next to their use
1008         - Eliminating one shift/reduce conflict caused by two "maybe_space" in a row
1009         - Breaking the conditional sections out into their own sections instead of
1010           scattering them in with the other code.
1011         - Eliminating unused return values in productions such as charset,
1012           ignored_charset, namespace, margin_box, invalid_rule, save_block,
1013           invalid_at, and declarations_and_margins.
1014         - Adding %destructor to productions that return values that need to be deleted
1015           or deref'd. This removes the need for CSSParser to separately track these
1016           as "floating" to clean up in case of errors.
1017         - Removing unneeded productions such as media_feature, region_selector,
1018           attr_name, and medium.
1019         - Removing explicit code blocks that just say "$$ = $1" or empty blocks when
1020           there is no return type, since those are default.
1021         - Formatting many productions on single lines since I find them easier to read.
1022           Later I think we could make many more CSSParser functions and make even
1023           more of the production single lines in the grammar file.
1024         - Using adoptPtr, adoptRef, delete, deref, leakPtr, and leakRef to put
1025           heap allocated values into and out of the union without storage leaks.
1026           
1027         * css/CSSParser.cpp:
1028         (WebCore::CSSParser::~CSSParser): Remove the now-unneeded deleteAllValues for
1029         the various colections of floating things.
1030         (WebCore::CSSParser::createFilterRule): Don't put the rule into m_parsedRules,
1031         just return a PassRefPtr instead.
1032         (WebCore::CSSParser::createImportRule): Ditto.
1033         (WebCore::CSSParser::createMediaRule): Ditto.
1034         (WebCore::CSSParser::createEmptyMediaRule): Ditto.
1035         (WebCore::CSSParser::createSupportsRule): Ditto.
1036         (WebCore::CSSParser::createKeyframesRule): Ditto.
1037         (WebCore::CSSParser::createStyleRule): Ditto.
1038         (WebCore::CSSParser::createFontFaceRule): Ditto.
1039         (WebCore::CSSParser::createHostRule): Ditto.
1040         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded): Got rid of the
1041         unused return value from this function and changed it to to take a reference
1042         instead of a pointer.
1043         (WebCore::CSSParser::rewriteSpecifiersWithElementName): Ditto.
1044         (WebCore::CSSParser::rewriteSpecifiers): Changed this to take and return OwnPtr.
1045         (WebCore::CSSParser::createPageRule): Don't put rule into m_parsedRules, return
1046         PassRefPtr instead.
1047         (WebCore::CSSParser::createSelectorVector): Added. Used to implement the
1048         optimization where we recycle a single selector vector. Not sure we still need
1049         this, or maybe we need more optimizations like it, but for now keep it.
1050         (WebCore::CSSParser::recycleSelectorVector): Ditto.
1051         (WebCore::CSSParser::createRegionRule): Don't put rule into m_parsedRules, return
1052         PassRefPtr instead.
1053         (WebCore::CSSParser::createMarginAtRule): Got rid of unused return value.
1054         When this function is implemented for real, we might add a return value.
1055         (WebCore::CSSParser::createKeyframe): Don't put keyframe into m_parsedKeyframes,
1056         return PassRefPtr instead.
1057         (WebCore::CSSParser::createViewportRule): Don't put rule into m_parsedRules, return
1058         PassRefPtr instead.
1059
1060         * css/CSSParser.h: Removed many now-needed functions to manage floating items.
1061         Changed rule creation functions to return PassRefPtr. Other changes as mentioned above.
1062
1063         * css/CSSParserValues.cpp:
1064         (WebCore::destroy): Added.
1065         (WebCore::CSSParserValueList::~CSSParserValueList): Updated to call destroy.
1066         * css/CSSParserValues.h: Ditto.
1067
1068 2013-09-11  Mario Sanchez Prada  <mario.prada@samsung.com>
1069
1070         [GTK] Remove Gail dependency from build system for GTK3
1071         https://bugs.webkit.org/show_bug.cgi?id=119673
1072
1073         Reviewed by Gustavo Noronha Silva.
1074
1075         * GNUmakefile.am: Removed GAIL_CFLAGS.
1076         * PlatformGTK.cmake: Removed GAIL3_INCLUDE_DIRS and GAIL3_LIBRARIES.
1077
1078 2013-09-11  Andreas Kling  <akling@apple.com>
1079
1080         Remove Widget::widgetPositionsUpdated().
1081         <https://webkit.org/b/121160>
1082
1083         Reviewed by Anders Carlsson.
1084
1085         Remove this no-op virtual that was only used by chromium.
1086
1087 2013-09-11  Andreas Kling  <akling@apple.com>
1088
1089         Page::backForward() should return a reference.
1090         <https://webkit.org/b/121151>
1091
1092         Reviewed by Anders Carlsson.
1093
1094         There is always a BackForwardController, so make backForward() return a reference.
1095         Also made it store a Page& internally since it's tied to the lifetime of Page.
1096
1097 2013-09-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1098
1099         WTF::OwnPtr should behave similarly with the rest of WTF smart pointers
1100         https://bugs.webkit.org/show_bug.cgi?id=120773
1101
1102         Reviewed by Anders Carlsson.
1103
1104         Before the change OwnPtr could take either the pointer type or the pointed-to type, which was bad
1105         for the following reasons:
1106         - It distinguished OwnPtr behaviour from other WTF smart pointer classes behaviour (so it was confusing for the Client).
1107         - It was potential error-prone as it actually modified the type given by the Client in opaque way.
1108
1109         * page/animation/CSSPropertyAnimation.cpp:
1110         (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
1111         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
1112
1113 2013-09-11  Andreas Kling  <akling@apple.com>
1114
1115         FrameView: Tighten widget handling code.
1116         <https://webkit.org/b/121155>
1117
1118         Reviewed by Antti Koivisto.
1119
1120         Harden typing in this code to work with RenderEmbeddedObject& instead of RenderObject*.
1121         Functions and members renamed to reflect that they only deal with embedded objects.
1122
1123         * html/HTMLPlugInImageElement.h:
1124         (WebCore::toHTMLPlugInImageElement):
1125
1126             Add a toHTMLPlugInImageElement that takes an Element&.
1127
1128         * html/HTMLTagNames.in:
1129
1130             Generate type helpers for applet and embed elements.
1131
1132         * page/FrameView.h:
1133         * page/FrameView.cpp:
1134         (WebCore::FrameView::addEmbeddedObjectToUpdate):
1135         (WebCore::FrameView::removeEmbeddedObjectToUpdate):
1136         (WebCore::FrameView::updateEmbeddedObjects):
1137         (WebCore::FrameView::updateEmbeddedObject):
1138
1139             Re-ordered this function in early return style. Change locals into references.
1140
1141         * rendering/RenderEmbeddedObject.cpp:
1142         (WebCore::RenderEmbeddedObject::~RenderEmbeddedObject):
1143         (WebCore::RenderEmbeddedObject::layout):
1144         * rendering/RenderSnapshottedPlugIn.cpp:
1145         (WebCore::RenderSnapshottedPlugIn::layout):
1146
1147             Updated for new FrameView function signatures.
1148
1149 2013-09-11  Patrick Gansterer  <paroga@webkit.org>
1150
1151         [CMake] Split out generic Windows files into its own file
1152         https://bugs.webkit.org/show_bug.cgi?id=119514
1153
1154         Reviewed by Gyuyoung Kim.
1155
1156         This allows us to add smaller CMakeLists.txt files when
1157         adding additional Windows ports.
1158
1159         * PlatformWin.cmake: Copied from Source/WebCore/PlatformWinCE.cmake.
1160         * PlatformWinCE.cmake:
1161
1162 2013-09-11  Mario Sanchez Prada  <mario.prada@samsung.com>
1163
1164         [GTK] Get rid of Pango/Gail dependencies in accessibility for ATK
1165         https://bugs.webkit.org/show_bug.cgi?id=114867
1166
1167         Reviewed by Martin Robinson.
1168
1169         Removed all trace of Gail and Pango specific code from the AtkText
1170         implementation, now everything has been reimplemented.
1171
1172         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1173         (webkitAccessibleTextGetTextForOffset): Removed fallback code
1174         relying in Gail/Pango, now all the related code has been
1175         removed. Also, replaced the collection of if statements with a
1176         switch, for better readability of the code.
1177
1178 2013-09-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1179
1180         Mouseenter/-leave not triggered when element under cursor is moved/removed
1181         https://bugs.webkit.org/show_bug.cgi?id=120786
1182
1183         Reviewed by Antonio Gomes.
1184
1185         When a hovered element is detached it will now emit a fake mousemove event
1186         similar to what happens when a hovered element has CSS display set to none.
1187
1188         Test: fast/events/mouseenterleave-detached-element.html
1189
1190         * dom/Document.cpp:
1191         (WebCore::Document::hoveredElementDidDetach):
1192         * page/EventHandler.cpp:
1193         (WebCore::EventHandler::EventHandler):
1194         (WebCore::EventHandler::clear):
1195         (WebCore::EventHandler::handleMouseMoveEvent):
1196         * page/EventHandler.h:
1197
1198 2013-09-11  Krzysztof Czech  <k.czech@samsung.com>
1199
1200         [ATK] Adds mapping MenuItemRadioRole to ATK
1201         https://bugs.webkit.org/show_bug.cgi?id=121149
1202
1203         Reviewed by Mario Sanchez Prada.
1204
1205         Adds mapping MenuItemRadioRole to ATK.
1206
1207         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1208         (atkRole):
1209
1210 2013-09-10  Mario Sanchez Prada  <mario.prada@samsung.com>
1211
1212         [GTK] Reimplement atk_text_get_text_*_offset for LINE boundaries
1213         https://bugs.webkit.org/show_bug.cgi?id=114872
1214
1215         Reviewed by Gustavo Noronha Silva.
1216
1217         Re-implement these functions without using GailTextUtil nor Pango.
1218
1219         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1220         (lineAtPositionForAtkBoundary): New helper function to find the
1221         line at a given position considering values of AtkTextBoundary.
1222         (webkitAccessibleTextLineForBoundary): New function,
1223         implementing atk_text_get_text_*_offset for LINE.
1224         (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
1225         LINE boundaries with webkitAccessibleTextLineForBoundary().
1226
1227 2013-09-11  Andreas Kling  <akling@apple.com>
1228
1229         Missed one BackForwardListImpl.h in the last commit.
1230
1231         * history/BackForwardList.cpp:
1232
1233 2013-09-11  Andreas Kling  <akling@apple.com>
1234
1235         Rename BackForwardListImpl.{cpp,h} => BackForwardClient.{cpp,h}
1236
1237         Rubber-stamped by Antti Koivisto.
1238
1239 2013-09-10  Ryosuke Niwa  <rniwa@webkit.org>
1240
1241         CSSProperty::isInheritedProperty is large
1242         https://bugs.webkit.org/show_bug.cgi?id=121083
1243
1244         Reviewed by Sam Weinig.
1245
1246         Support [Inherited] option in makeprop.pl and generate CSSProperty::isInheritedProperty in CSSPropertyNames.cpp
1247         using a lookup table. We can pack the table better by using bitfield in the future but I think boolean lookup
1248         table is a good first cut.
1249
1250         Updated CSSPropertyNames.in and SVGCSSPropertyNames.in to use the new option and removed the old code from
1251         CSSProperty.cpp.
1252
1253         * css/CSSProperty.cpp:
1254         * css/CSSPropertyNames.in:
1255         * css/SVGCSSPropertyNames.in:
1256         * css/makeprop.pl:
1257
1258 2013-09-11  Andreas Kling  <akling@apple.com>
1259
1260         Rename BackForwardListImpl => BackForwardList.
1261         <https://webkit.org/b/121146>
1262
1263         Reviewed by Antti Koivisto.
1264
1265         Nuke another old FIXME.
1266
1267 2013-09-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1268
1269         Generate more HTML type checks and casting
1270         https://bugs.webkit.org/show_bug.cgi?id=121080
1271
1272         Reviewed by Andreas Kling.
1273
1274         Clean-up remained functions of HTML elements using auto-generated isFooElement(),
1275         and replace toFooElement() with ELEMENT_TYPE_CASTS() macro.
1276
1277         Besides this patch clean-up unnecessary checks which are being supported by
1278         auto-generated isFooElement().
1279
1280         No new tests, no behavior change.
1281
1282         * accessibility/atk/AXObjectCacheAtk.cpp:
1283         (WebCore::notifyChildrenSelectionChange):
1284         * html/HTMLFrameElementBase.h:
1285         (WebCore::toHTMLFrameElementBase):
1286         * html/HTMLIFrameElement.h:
1287         * html/HTMLImageLoader.cpp:
1288         (WebCore::HTMLImageLoader::dispatchLoadEvent):
1289         (WebCore::HTMLImageLoader::notifyFinished):
1290         * html/HTMLObjectElemenaeh:
1291         * html/HTMLOptionsCollection.cpp:
1292         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
1293         * html/HTMLSelectElement.h:
1294         * html/HTMLTagNames.in:
1295         * html/HTMLVideoElement.h:
1296         * html/shadow/HTMLContentElement.h:
1297         * loader/ImageLoader.cpp:
1298         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
1299         * loader/archive/cf/LegacyWebArchive.cpp:
1300         (WebCore::LegacyWebArchive::create):
1301         * page/PageSerializer.cpp:
1302         (WebCore::frameOwnerURLAttributeName):
1303         * page/SpatialNavigation.cpp:
1304         (WebCore::canScrollInDirection):
1305         * platform/gtk/PasteboardGtk.cpp:
1306         (WebCore::getURLForImageNode):
1307         * plugins/IFrameShimSupport.cpp:
1308         (WebCore::getPluginOcclusions):
1309         * rendering/HitTestResult.cpp:
1310         (WebCore::HitTestResult::mediaSupportsFullscreen):
1311         (WebCore::HitTestResult::mediaElement):
1312         (WebCore::HitTestResult::enterFullscreenForVideo):
1313         (WebCore::HitTestResult::mediaIsVideo):
1314
1315         * rendering/RenderLayerCompositor.cpp:
1316         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
1317         * rendering/RenderListBox.cpp:
1318         (WebCore::RenderListBox::RenderListBox):
1319         * rendering/RenderMenuList.cpp:
1320         (WebCore::RenderMenuList::RenderMenuList):
1321         * testing/Internals.cpp:
1322         (WebCore::Internals::isSelectPopupVisible):
1323
1324 2013-09-11  Chris Fleizach  <cfleizach@apple.com>
1325
1326         AX: Mac platform is not using accessibilityTitle from the Base implementation
1327         https://bugs.webkit.org/show_bug.cgi?id=121109
1328
1329         Reviewed by Sam Weinig.
1330
1331         Remove the Mac platform overrides of accessibilityTitle, Description, HelpText. 
1332         The Base implementation has these and we can share them between iOS and Mac
1333
1334         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1335         (-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
1336         (-[WebAccessibilityObjectWrapperBase accessibilityDescription]):
1337         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1338
1339 2013-09-11  Andreas Kling  <akling@apple.com>
1340
1341         Rename BackForwardList.h => BackForwardClient.h
1342
1343         Rubber-stamped by Antti Koivisto.
1344
1345 2013-09-11  Andreas Kling  <akling@apple.com>
1346
1347         Rename BackForwardList => BackForwardClient.
1348         <https://webkit.org/b/121143>
1349
1350         Reviewed by Antti Koivisto.
1351
1352         Nuke a 3 year old FIXME about renaming this class.
1353
1354 2013-09-10  Daniel Bates  <dabates@apple.com>
1355
1356         [iOS] Upstream text autosizing
1357         https://bugs.webkit.org/show_bug.cgi?id=121111
1358
1359         Reviewed by Andy Estes and Sam Weinig.
1360
1361         Tests: platform/iphone-simulator/text-autosizing/anonymous-block.html
1362                platform/iphone-simulator/text-autosizing/contenteditable.html
1363                platform/iphone-simulator/text-autosizing/first-letter.html
1364                platform/iphone-simulator/text-autosizing/font-family-case-insensitive.html
1365                platform/iphone-simulator/text-autosizing/lists.html
1366                platform/iphone-simulator/text-autosizing/overflow.html
1367                platform/iphone-simulator/text-autosizing/percent-adjust-length-line-height.html
1368                platform/iphone-simulator/text-autosizing/percent-adjust-number-line-height.html
1369                platform/iphone-simulator/text-autosizing/percent-adjust-percent-line-height.html
1370
1371         * WebCore.exp.in:
1372         * WebCore.xcodeproj/project.pbxproj:
1373         * css/CSSComputedStyleDeclaration.cpp:
1374         (WebCore::ComputedStyleExtractor::propertyValue):
1375         * css/CSSParser.cpp:
1376         (WebCore::isValidKeywordPropertyAndValue):
1377         (WebCore::CSSParser::parseValue):
1378         * css/CSSProperty.cpp:
1379         (WebCore::CSSProperty::isInheritedProperty):
1380         * css/CSSPropertyNames.in: Add property -webkit-text-size-adjust.
1381         * css/DeprecatedStyleBuilder.cpp:
1382         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Added.
1383         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInitialValue): Added.
1384         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInheritValue): Added.
1385         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::createHandler): Added.
1386         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1387         * css/StyleResolver.cpp:
1388         (WebCore::StyleResolver::updateFont):
1389         (WebCore::StyleResolver::applyProperties): Add COMPILE_ASSERT to ensure that
1390         all properties that affect font size, including -webkit-text-size-adjust, are
1391         resolved before properties that depend on them; see <rdar://problem/13522835>.
1392         (WebCore::StyleResolver::applyProperty):
1393         (WebCore::StyleResolver::checkForTextSizeAdjust): Added.
1394         * css/StyleResolver.h:
1395         * dom/Document.cpp:
1396         (WebCore::TextAutoSizingTraits::constructDeletedValue): Added.
1397         (WebCore::TextAutoSizingTraits::isDeletedValue): Added.
1398         (WebCore::Document::detach):
1399         (WebCore::Document::addAutoSizingNode): Added.
1400         (WebCore::Document::validateAutoSizingNodes): Added.
1401         (WebCore::Document::resetAutoSizingNodes): Added.
1402         * dom/Document.h:
1403         * editing/EditingStyle.cpp:
1404         * page/Frame.h: Add declarations for setTextAutosizingWidth(), textAutosizingWidth().
1405         * page/FrameView.cpp:
1406         (WebCore::FrameView::layout):
1407         * page/Settings.in: Generate setter and getter for setting minimumZoomFontSize.
1408         * platform/graphics/Font.h:
1409         (WebCore::Font::equalForTextAutoSizing): Added.
1410         * platform/graphics/FontDescription.cpp:
1411         (WebCore::FontDescription::familiesEqualForTextAutoSizing): Added.
1412         * platform/graphics/FontDescription.h:
1413         (WebCore::FontDescription::equalForTextAutoSizing): Added.
1414         * rendering/RenderBlock.cpp:
1415         (WebCore::RenderBlock::RenderBlock):
1416         (WebCore::isVisibleRenderText): Added.
1417         (WebCore::resizeTextPermitted): Added.
1418         (WebCore::RenderBlock::immediateLineCount): Added.
1419         (WebCore::isNonBlocksOrNonFixedHeightListItems): Added.
1420         (WebCore::oneLineTextMultiplier): Added.
1421         (WebCore::textMultiplier): Added.
1422         (WebCore::RenderBlock::adjustComputedFontSizes): Added.
1423         * rendering/RenderBlock.h:
1424         (WebCore::RenderBlock::resetComputedFontSize): Added.
1425         * rendering/RenderObject.cpp:
1426         (WebCore::RenderObject::traverseNext): Added.
1427         (WebCore::includeNonFixedHeight): Added.
1428         (WebCore::RenderObject::adjustComputedFontSizesOnBlocks): Added.
1429         (WebCore::RenderObject::resetTextAutosizing): Added.
1430         * rendering/RenderObject.h:
1431         * rendering/RenderText.cpp:
1432         (WebCore::RenderText::RenderText):
1433         * rendering/RenderText.h:
1434         (WebCore::RenderText::candidateComputedTextSize): Added.
1435         (WebCore::RenderText::setCandidateComputedTextSize): Added.
1436         * rendering/style/RenderStyle.cpp:
1437         (WebCore::computeFontHash):
1438         (WebCore::RenderStyle::hashForTextAutosizing): Added.
1439         (WebCore::RenderStyle::equalForTextAutosizing): Added.
1440         (WebCore::RenderStyle::changeRequiresLayout):
1441         (WebCore::RenderStyle::specifiedLineHeight): Added; iOS-specific variant.
1442         We should reconcile this getter with the getter of the same name that is
1443         compiled when building with IOS_TEXT_AUTOSIZING disabled.
1444         (WebCore::RenderStyle::setSpecifiedLineHeight): Added.
1445         * rendering/style/RenderStyle.h:
1446         (WebCore::RenderStyle::initialSpecifiedLineHeight): Added.
1447         (WebCore::RenderStyle::initialTextSizeAdjust): Added.
1448         (WebCore::RenderStyle::setTextSizeAdjust): Added.
1449         (WebCore::RenderStyle::textSizeAdjust): Added.
1450         * rendering/style/StyleInheritedData.cpp:
1451         (WebCore::StyleInheritedData::StyleInheritedData):
1452         (WebCore::StyleInheritedData::operator==):
1453         * rendering/style/StyleInheritedData.h:
1454         * rendering/style/StyleRareInheritedData.cpp:
1455         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1456         (WebCore::StyleRareInheritedData::operator==):
1457         * rendering/style/StyleRareInheritedData.h:
1458         * rendering/style/TextSizeAdjustment.h: Added.
1459         (TextSizeAdjustment::TextSizeAdjustment):
1460         (TextSizeAdjustment::percentage):
1461         (TextSizeAdjustment::multiplier):
1462         (TextSizeAdjustment::isAuto):
1463         (TextSizeAdjustment::isNone):
1464         (TextSizeAdjustment::isPercentage):
1465         (TextSizeAdjustment::operator == ):
1466         (TextSizeAdjustment::operator != ):
1467
1468 2013-09-10  Chris Fleizach  <cfleizach@apple.com>
1469
1470         AX: AXValue/AXMenuItemMarkChar not defined for menuitemradio (should be false (0) with aria-checked=mixed | undefined)
1471         https://bugs.webkit.org/show_bug.cgi?id=120372
1472
1473         Reviewed by Mario Sanchez Prada.
1474
1475         Add new roles to make the distinction between menu item, menu item radio and menu item checkbox.
1476         Expose AXValue for menu items, so that they can convey the, on/off/mixed state of aria-checked.
1477
1478         Test: platform/mac/accessibility/menu-item-values.html
1479
1480         * accessibility/AccessibilityNodeObject.cpp:
1481         (WebCore::AccessibilityNodeObject::isMenuRelated):
1482         (WebCore::AccessibilityNodeObject::isMenuItem):
1483         (WebCore::AccessibilityNodeObject::isChecked):
1484         (WebCore::AccessibilityNodeObject::actionElement):
1485         (WebCore::AccessibilityNodeObject::visibleText):
1486         (WebCore::AccessibilityNodeObject::title):
1487         * accessibility/AccessibilityObject.cpp:
1488         (WebCore::createARIARoleMap):
1489         (WebCore::AccessibilityObject::checkboxOrRadioValue):
1490         * accessibility/AccessibilityObject.h:
1491         * accessibility/AccessibilityRenderObject.cpp:
1492         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1493         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1494         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
1495         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
1496         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1497         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1498         (createAccessibilityRoleMap):
1499         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1500
1501 2013-09-10  Anders Carlsson  <andersca@apple.com>
1502
1503         Remove wtf/Alignment.h
1504         https://bugs.webkit.org/show_bug.cgi?id=121077
1505
1506         Reviewed by Andreas Kling.
1507
1508         * platform/PODArena.h:
1509         (WebCore::PODArena::minAlignment):
1510         * platform/graphics/cpu/arm/filters/FELightingNEON.h:
1511         (WebCore::FELighting::platformApplyNeon):
1512
1513 2013-09-10  Zoltan Horvath  <zoltan@webkit.org>
1514
1515         [Qt] Add FloatingObjects.h to Target.pri
1516         https://bugs.webkit.org/show_bug.cgi?id=121117
1517
1518         Reviewed by Andreas Kling.
1519
1520         No new tests, no behavior change.
1521
1522         * Target.pri:
1523
1524 2013-09-10  Sergio Correia  <sergio.correia@openbossa.org>
1525
1526         Fix EFL build after r155477
1527         https://bugs.webkit.org/show_bug.cgi?id=121126
1528
1529         Reviewed by Antonio Gomes.
1530
1531         No new tests, build fix.
1532
1533         * CMakeLists.txt: MediaStreamComponent.cpp and MediaStreamDescriptor.cpp
1534         were added with an incorrect path.
1535
1536 2013-09-10  Andreas Kling  <akling@apple.com>
1537
1538         AnimationController should have a Frame& internally.
1539         <https://webkit.org/b/121078>
1540
1541         Reviewed by Anders Carlsson.
1542
1543         The AnimationController is owned by the Frame so make the back-pointer
1544         a reference. This knocks off a couple of null checks.
1545
1546 2013-09-10  Anders Carlsson  <andersca@apple.com>
1547
1548         More WTF/Alignment.h removal
1549         https://bugs.webkit.org/show_bug.cgi?id=121125
1550
1551         Reviewed by Andreas Kling.
1552
1553         * platform/PODArena.h:
1554
1555 2013-09-10  Eric Carlson  <eric.carlson@apple.com>
1556
1557         Make MediaStream objects ScriptWrappable
1558         https://bugs.webkit.org/show_bug.cgi?id=120879
1559
1560         Reviewed by Jer Noble.
1561
1562         * Modules/mediastream/MediaStream.h: Inherit from ScriptWrappable.
1563         * Modules/mediastream/MediaStreamTrack.h: Ditto.
1564         * Modules/mediastream/RTCDTMFSender.h: Ditto.
1565         * Modules/mediastream/RTCDataChannel.h: Ditto.
1566         * Modules/mediastream/RTCIceCandidate.h: Ditto.
1567         * Modules/mediastream/RTCPeerConnection.h: Ditto.
1568         * Modules/mediastream/RTCSessionDescription.h: Ditto.
1569         * Modules/mediastream/RTCStatsReport.h: Ditto.
1570         * Modules/mediastream/RTCStatsResponse.h: Ditto.
1571
1572 2013-09-10  Eric Carlson  <eric.carlson@apple.com>
1573
1574         Split MediaStreamDescriptor.h and MediaStreamComponent.h into .h and .cpp
1575         https://bugs.webkit.org/show_bug.cgi?id=120878
1576
1577         Reviewed by Jer Noble.
1578
1579         No new tests, no functional change.
1580
1581         * CMakeLists.txt: Add MediaStreamComponent.cpp and MediaStreamDescriptor.cpp.
1582         * GNUmakefile.list.am: Ditto.
1583
1584         * Modules/mediastream/LocalMediaStream.cpp:
1585         (WebCore::LocalMediaStream::create): MediaStreamDescriptor::create() doesn't take a UUID.
1586
1587         * Modules/mediastream/MediaStream.cpp:
1588         (WebCore::createFromSourceVectors): Ditto.
1589
1590         * WebCore.xcodeproj/project.pbxproj: Add MediaStreamComponent.cpp and MediaStreamDescriptor.cpp.
1591
1592         * platform/mediastream/MediaStreamComponent.cpp: Added.
1593         * platform/mediastream/MediaStreamComponent.h:
1594
1595         * platform/mediastream/MediaStreamDescriptor.cpp: Added.
1596         * platform/mediastream/MediaStreamDescriptor.h:
1597
1598 2013-09-10  Brent Fulgham  <bfulgham@apple.com>
1599
1600         [Windows] Create SharedGDIObject Class Template
1601         https://bugs.webkit.org/show_bug.cgi?id=121037
1602
1603         Reviewed by Anders Carlsson.
1604
1605         * WebCore.vcxproj/WebCore.vcxproj: Remove RefCountedGDIHandle.h, and
1606         add new SharedGDIObject.h file.
1607         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1608         * platform/graphics/FontPlatformData.h:
1609         (WebCore::FontPlatformData::hfont): Switch to new SharedGDIObject.
1610         * platform/graphics/win/FontPlatformDataCGWin.cpp:
1611         (WebCore::FontPlatformData::FontPlatformData): Ditto.
1612         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
1613         (WebCore::FontPlatformData::FontPlatformData): Ditto.
1614         * platform/graphics/win/FontPlatformDataWin.cpp:
1615         (WebCore::FontPlatformData::FontPlatformData): Ditto.
1616         * platform/graphics/win/RefCountedGDIHandle.h: Removed.
1617         * platform/graphics/win/SharedGDIObject.h: Added.
1618         (WebCore::SharedGDIObject::create):
1619         (WebCore::SharedGDIObject::get):
1620         (WebCore::SharedGDIObject::hash):
1621         (WebCore::SharedGDIObject::SharedGDIObject):
1622
1623 2013-09-10  Tim Horton  <timothy_horton@apple.com>
1624
1625         [mac] PDFDocumentImage should use PDFKit to draw
1626         https://bugs.webkit.org/show_bug.cgi?id=120651
1627         <rdar://problem/12810731>
1628
1629         Unreviewed hopeful build fix.
1630
1631         * platform/graphics/mac/PDFDocumentImageMac.mm:
1632
1633 2013-09-10  Tim Horton  <timothy_horton@apple.com>
1634
1635         [mac] PDFDocumentImage should use PDFKit to draw
1636         https://bugs.webkit.org/show_bug.cgi?id=120651
1637         <rdar://problem/12810731>
1638
1639         Reviewed by Alexey Proskuryakov.
1640
1641         Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.
1642
1643         Test: fast/images/pdf-as-image-with-annotations.html
1644
1645         * WebCore.xcodeproj/project.pbxproj:
1646         Add PDFDocumentImageMac.mm.
1647
1648         * platform/graphics/cg/PDFDocumentImage.cpp:
1649         (WebCore::PDFDocumentImage::PDFDocumentImage):
1650         We don't need to initialize m_document anymore because it's now a RetainPtr.
1651         Initialize m_hasPage to false.
1652
1653         (WebCore::PDFDocumentImage::~PDFDocumentImage):
1654         We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.
1655
1656         (WebCore::PDFDocumentImage::size):
1657         Use expandedIntSize for explicitness.
1658
1659         (WebCore::PDFDocumentImage::applyRotationForPainting):
1660         Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
1661         We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
1662         Also, explicitly use std::min instead of importing the whole std namespace.
1663
1664         (WebCore::PDFDocumentImage::dataChanged):
1665         Assert that we don't re-enter dataChanged after we've created a document,
1666         because it seems like that shouldn't happen - we only create a document when
1667         we've supposedly received all data, and it would be nice if we didn't have
1668         all this varying code to deal with SharedBuffers changing out from under each other.
1669         Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
1670         replace it with a different implementation that creates a PDFDocument.
1671
1672         (WebCore::PDFDocumentImage::setCurrentPage):
1673         Make all page-number-related things unsigned, since they are in CG and PDFKit,
1674         and add m_hasPage to denote whether we've acquired a valid page yet.
1675         Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
1676         Remove setCurrentPage itself, as we never use a page other than the first page;
1677         we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.
1678
1679         (WebCore::PDFDocumentImage::draw):
1680         Fix a weird comment.
1681         Factor code that actually draws the PDF out into drawPDFPage.
1682
1683         The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):
1684
1685         (WebCore::PDFDocumentImage::createPDFDocument):
1686         Factored out of dataChanged(). Use the PLATFORM(MAC) way of making a
1687         CGDataProvider from a SharedBuffer everywhere; we're already using it on
1688         iOS, and it should also work for Windows, the only other USE(CG) platform.
1689         Since we only createPDFDocument() after all data has been received, remove
1690         the comment about the SharedBuffer being secretly written to behind its back.
1691
1692         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
1693         Factored out of setCurrentPage().
1694         Use deg2rad since we have it.
1695
1696         (WebCore::PDFDocumentImage::pageCount):
1697         (WebCore::PDFDocumentImage::drawPDFPage):
1698         Factored out of draw().
1699         Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).
1700
1701         * platform/graphics/cg/PDFDocumentImage.h:
1702         Unindent all the things, as we don't indent the first level inside a namespace scope.
1703         Forward-declare PDFDocument.
1704         Make m_currentPage unsigned as it should be.
1705         Add m_hasPage.
1706         Make m_document a PDFDocument on PLATFORM(MAC) and a CGPDFDocumentRef on other platforms.
1707
1708         * platform/graphics/mac/PDFDocumentImageMac.mm: Added.
1709         Soft-link in PDFKit and specifically the PDFDocument class.
1710
1711         (WebCore::PDFDocumentImage::createPDFDocument):
1712         Create our PDFDocument from the SharedBuffer's NSData directly. This shouldn't be a problem
1713         (with respect to the SharedBuffer's data being appended to in secret), because we've waited
1714         for the document to finish loading before getting here.
1715
1716         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
1717         Ask PDFKit for the page's media and crop boxes; it automatically performs the correct fallback.
1718         Ask PDFKit for the page's rotation.
1719
1720         (WebCore::PDFDocumentImage::pageCount):
1721         Ask PDFKit for the page count.
1722
1723         (WebCore::PDFDocumentImage::drawPDFPage):
1724         Paint the current page of the PDF. Note that we do not apply the rotation here
1725         via applyRotationForPainting because PDFKit will do it itself.
1726         Save and restore two bits of CG state which aren't saved and restored with the
1727         graphics state, as PDFKit can mutate them above us (<rdar://problem/14951759>).
1728
1729         * platform/mac/SoftLinking.h:
1730         I couldn't find any clients of SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA,
1731         so I made it the more generic SOFT_LINK_FRAMEWORK_IN_UMBRELLA, taking the name
1732         of the umbrella framework and the subframework, so I could use it to soft link
1733         Quartz.framework's PDFKit.framework.
1734
1735 2013-09-10  Tim Horton  <timothy_horton@apple.com>
1736
1737         [mac] <progress> has rendering artifacts along the bottom
1738         https://bugs.webkit.org/show_bug.cgi?id=120865
1739         <rdar://problem/11571240>
1740
1741         Reviewed by Simon Fraser.
1742
1743         Allow RenderTheme to force the height of a <progress> bar.
1744
1745         Test: platform/mac/fast/forms/indeterminate-progress-inline-height.html
1746
1747         * rendering/RenderProgress.cpp:
1748         (WebCore::RenderProgress::computeLogicalHeight):
1749         Borrowed from RenderMeter, allow the theme to override the size of the progress bar.
1750
1751         * rendering/RenderProgress.h:
1752         Drive-by add OVERRIDE to a few things.
1753
1754         * rendering/RenderTheme.cpp:
1755         (WebCore::RenderTheme::progressBarRectForBounds):
1756         * rendering/RenderTheme.h:
1757         Add a default implementation of progressBarRectForBounds that just passes the bounds through.
1758
1759         * rendering/RenderThemeMac.h:
1760         * rendering/RenderThemeMac.mm:
1761         (WebCore::RenderThemeMac::progressBarRectForBounds):
1762         Override progressBarRectForBounds; the implementation is factored out of paintProgressBar.
1763
1764         (WebCore::RenderThemeMac::paintProgressBar):
1765         Make use of the factored-out progressBarRectForBounds().
1766
1767         Drive-by apply the device scale factor to the progress bar's image buffer,
1768         so that it is rendered at 2x on appropriate hardware. Also, multiply the
1769         progress animation phase by the device scale factor, as the phase value seems
1770         to be proportional to the actual pixel offset of the animation; without this,
1771         the animation would appear to progress half as slowly in HiDPI.
1772
1773 2013-09-10  Chris Fleizach  <cfleizach@apple.com>
1774
1775         AX: Expose DOM ID and ClassList to AX APIs for automation and AT element hashes
1776         https://bugs.webkit.org/show_bug.cgi?id=120552
1777
1778         Reviewed by Darin Adler.
1779
1780         Add Mac support for exposing the DOM ID and DOM class list so that accessibility
1781         clients can leverage that information.
1782
1783         Test: platform/mac/accessibility/id-class-attributes.html
1784
1785         * accessibility/AccessibilityObject.cpp:
1786         (WebCore::AccessibilityObject::domIdentifier):
1787         (WebCore::AccessibilityObject::domClassList):
1788         * accessibility/AccessibilityObject.h:
1789         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1790         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1791         (convertStringsToNSArray):
1792         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1793
1794 2013-09-10  Denis Nomiyama  <d.nomiyama@samsung.com>
1795
1796         [GTK] accessibility/loading-iframe-sends-notification.html is failing
1797         https://bugs.webkit.org/show_bug.cgi?id=98370
1798
1799         Reviewed by Chris Fleizach.
1800
1801         Enabled AXLayoutComplete on the GTK platform.
1802
1803         No new tests are required because this feature will use an existing
1804         accessibility layout test that is currently failing on the GTK+ platform
1805         (e.g. loading-iframe-sends-notification.html).
1806
1807         * accessibility/atk/AXObjectCacheAtk.cpp:
1808         (WebCore::AXObjectCache::postPlatformNotification): Send layout-complete
1809         signal in case of AXLayoutComplete.
1810         * dom/Document.cpp:
1811         (WebCore::Document::implicitClose): Enabled AXLayoutComplete on the GTK
1812         platform.
1813         * page/FrameView.cpp:
1814         (WebCore::FrameView::layout): Enabled AXLayoutComplete on the GTK
1815         platform.
1816
1817 2013-09-09  Brent Fulgham  <bfulgham@apple.com>
1818
1819         [Windows] Change from using OwnPtr<GDI Stuff> to new GDIObject template.
1820         https://bugs.webkit.org/show_bug.cgi?id=120778
1821
1822         Reviewed by Anders Carlsson.
1823
1824         Change code to use a GDI-specific smart pointer, rather than OwnPtr. This
1825         is a first step to simplifying OwnPtr. It also gets rid of some Windows-
1826         specific code in WTF.
1827
1828         * WebCore.vcxproj/WebCore.vcxproj: Add the new header file.
1829         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1830         * page/win/FrameCGWin.cpp:
1831         (WebCore::imageFromRect): Switch to GDIObject.
1832         * page/win/FrameCairoWin.cpp:
1833         (WebCore::imageFromRect): Switch to GDIObject.
1834         * page/win/FrameWin.cpp:
1835         (WebCore::imageFromSelection): Switch to GDIObject.
1836         (WebCore::Frame::dragImageForSelection): Ditto.
1837         (WebCore::Frame::nodeImage): Ditto.
1838         * page/win/FrameWin.h:
1839         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1840         (WebCore::getDirtyRects): Switch from OwnPtr to GDIObject.
1841         * platform/graphics/win/FontCacheWin.cpp:
1842         (WebCore::createGDIFont): Switch to GDIObject.
1843         (WebCore::FontCache::createFontPlatformData): Ditto.
1844         * platform/graphics/win/FontCustomPlatformData.cpp:
1845         (WebCore::FontCustomPlatformData::fontPlatformData): Switch to GDIObject.
1846         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1847         (WebCore::FontCustomPlatformData::fontPlatformData): Switch to GDIObject.
1848         * platform/graphics/win/GraphicsContextCGWin.cpp:
1849         (WebCore::GraphicsContext::releaseWindowsContext): Switch to GDIObject.
1850         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1851         (WebCore::GraphicsContext::releaseWindowsContext): Switch to GDIObject.
1852         * platform/graphics/win/GraphicsContextWin.cpp:
1853         (WebCore::GraphicsContext::getWindowsContext): Switch to GDIObject.
1854         * platform/graphics/win/SimpleFontDataWin.cpp:
1855         (WebCore::SimpleFontData::platformCreateScaledFontData): Switch to GDIObject.
1856         * platform/win/CursorWin.cpp:
1857         (WebCore::createSharedCursor): Switch to GDIObject.
1858         * platform/win/DragImageCGWin.cpp:
1859         (WebCore::scaleDragImage): Switch to GDIObject.
1860         (WebCore::createDragImageFromImage):
1861         * platform/win/DragImageCairoWin.cpp: 
1862         (WebCore::scaleDragImage): Switch to GDIObject.
1863         (WebCore::createDragImageFromImage): Ditto.
1864         * platform/win/DragImageWin.cpp:
1865         (WebCore::createDragImageForLink): Switch to GDIObject.
1866         * platform/win/PasteboardWin.cpp:
1867         (WebCore::Pasteboard::writeImage): Switch to GDIObject.
1868         * platform/win/ScrollbarThemeWin.cpp:
1869         (WebCore::ScrollbarThemeWin::paintTrackPiece): Switch to GDIObject.
1870         * plugins/win/PluginViewWin.cpp:
1871         (WebCore::PluginView::updatePluginWidget): Switch to GDIObject.
1872         (WebCore::PluginView::snapshot): Ditto.
1873         * rendering/RenderThemeWin.cpp:
1874         (WebCore::drawControl): Switch to GDIObject.
1875
1876 2013-09-10  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1877
1878         REGRESSION (r147454): Youtube annotation links to new window broken
1879         https://bugs.webkit.org/show_bug.cgi?id=114242
1880
1881         Reviewed by Anders Carlsson.
1882
1883         Set the UserGestureIndicator to allow popups the same way the issue was solved for WebKit2.
1884
1885         * plugins/PluginView.cpp:
1886         (WebCore::PluginView::performRequest):
1887
1888 2013-09-10  Alberto Garcia  <berto@igalia.com>
1889
1890         [GTK] The code generator produces a warning if a parameter can be NULL
1891         https://bugs.webkit.org/show_bug.cgi?id=121093
1892
1893         Reviewed by Christophe Dumez.
1894
1895         Return an empty string instead of an undefined value if a
1896         particular parameter doesn't need to be checked.
1897
1898         * bindings/scripts/CodeGeneratorGObject.pm:
1899         (GetGReturnMacro):
1900
1901 2013-09-10  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1902
1903         MediaStream API: Enhance MediaStreamDescriptor add/remove component
1904         https://bugs.webkit.org/show_bug.cgi?id=120874
1905
1906         Merge blink https://chromium.googlesource.com/chromium/blink/+/67fcacf13ce922a762d7a1c6fb9e1b8e51e662ea
1907
1908         Reviewed by Eric Carlson.
1909
1910         No new tests needed.
1911
1912         * Modules/mediastream/MediaStream.cpp:
1913         (WebCore::MediaStream::addTrack):
1914         (WebCore::MediaStream::removeTrack):
1915         (WebCore::MediaStream::addRemoteTrack):
1916         (WebCore::MediaStream::removeRemoteTrack):
1917         * platform/mediastream/MediaStreamDescriptor.h:
1918         (WebCore::MediaStreamDescriptor::addRemoteTrack):
1919         (WebCore::MediaStreamDescriptor::removeRemoteTrack):
1920         (WebCore::MediaStreamDescriptor::addComponent):
1921         (WebCore::MediaStreamDescriptor::removeComponent):
1922
1923 2013-09-10  Andreas Kling  <akling@apple.com>
1924
1925         toFooElement() should use static_cast, not reinterpret_cast.
1926         <https://webkit.org/b/121087>
1927
1928         Reviewed by Antti Koivisto.
1929
1930         reinterpret_cast is not safe for downcasting with multiple inheritance.
1931         Add a ELEMENT_TYPE_CASTS(classname) macro that goes after class definitions.
1932         It expands into the following methods:
1933
1934             - FooElement* toFooElement(Node*)
1935             - const FooElement* toFooElement(const Node*)
1936             - FooElement& toFooElement(Node&)
1937             - const FooElement& toFooElement(const Node&)
1938
1939         As a bonus, it also adds these to catch unnecessary casting:
1940
1941             - void toFooElement(const Node*)
1942             - void toFooElement(const Node&)
1943
1944         There might be a more clever way of doing this, but this gets us to a
1945         correct place so we can think in peace.
1946
1947         * bridge/qt/qt_pixmapruntime.cpp:
1948         (JSC::Bindings::assignToHTMLImageElement):
1949         (JSC::Bindings::QtPixmapRuntime::toQt):
1950         * dom/Element.h:
1951         (WebCore::isElement):
1952         * dom/make_names.pl:
1953         (printTypeHelpers):
1954         * html/HTMLAnchorElement.h:
1955         * html/HTMLAreaElement.h:
1956         * html/HTMLAudioElement.h:
1957         * html/HTMLBaseElement.h:
1958         * html/HTMLCanvasElement.h:
1959         * html/HTMLElement.h:
1960         (WebCore::isHTMLElement):
1961         * html/HTMLFieldSetElement.h:
1962         * html/HTMLFormElement.h:
1963         * html/HTMLFrameSetElement.h:
1964         * html/HTMLImageElement.h:
1965         * html/HTMLInputElement.h:
1966         * html/HTMLLabelElement.h:
1967         * html/HTMLLegendElement.h:
1968         * html/HTMLMapElement.h:
1969         * html/HTMLMeterElement.h:
1970         * html/HTMLOptGroupElement.h:
1971         * html/HTMLOptionElement.h:
1972         * html/HTMLParamElement.h:
1973         * html/HTMLProgressElement.h:
1974         * html/HTMLScriptElement.h:
1975         * html/HTMLSourceElement.h:
1976         * html/HTMLStyleElement.h:
1977         * html/HTMLTableElement.h:
1978         * html/HTMLTableRowElement.h:
1979         * html/HTMLTextAreaElement.h:
1980         * html/HTMLTitleElement.h:
1981         * html/HTMLTrackElement.h:
1982         * svg/SVGAltGlyphDefElement.h:
1983         * svg/SVGAltGlyphElement.h:
1984         * svg/SVGAltGlyphItemElement.h:
1985         * svg/SVGAnimateMotionElement.h:
1986         * svg/SVGAnimateTransformElement.h:
1987         * svg/SVGCircleElement.h:
1988         * svg/SVGClipPathElement.h:
1989         * svg/SVGCursorElement.h:
1990         * svg/SVGEllipseElement.h:
1991         * svg/SVGFEDistantLightElement.h:
1992         * svg/SVGFEFuncAElement.h:
1993         * svg/SVGFEFuncBElement.h:
1994         * svg/SVGFEFuncGElement.h:
1995         * svg/SVGFEFuncRElement.h:
1996         * svg/SVGFEMergeNodeElement.h:
1997         * svg/SVGFEPointLightElement.h:
1998         * svg/SVGFESpotLightElement.h:
1999         * svg/SVGFilterElement.h:
2000         * svg/SVGFontElement.h:
2001         * svg/SVGFontFaceElement.h:
2002         * svg/SVGFontFaceNameElement.h:
2003         * svg/SVGFontFaceSrcElement.h:
2004         * svg/SVGFontFaceUriElement.h:
2005         * svg/SVGForeignObjectElement.h:
2006         * svg/SVGGlyphElement.h:
2007         * svg/SVGGlyphRefElement.h:
2008         * svg/SVGHKernElement.h:
2009         * svg/SVGImageElement.h:
2010         * svg/SVGLineElement.h:
2011         * svg/SVGLinearGradientElement.h:
2012         * svg/SVGMPathElement.h:
2013         * svg/SVGMarkerElement.h:
2014         * svg/SVGMaskElement.h:
2015         * svg/SVGMissingGlyphElement.h:
2016         * svg/SVGPathElement.h:
2017         * svg/SVGPatternElement.h:
2018         * svg/SVGRadialGradientElement.h:
2019         * svg/SVGRectElement.h:
2020         * svg/SVGSVGElement.h:
2021         * svg/SVGScriptElement.h:
2022         * svg/SVGStyleElement.h:
2023         * svg/SVGTextElement.h:
2024         * svg/SVGTextPathElement.h:
2025         * svg/SVGTitleElement.h:
2026         * svg/SVGUseElement.h:
2027         * svg/SVGVKernElement.h:
2028         * svg/SVGViewElement.h:
2029
2030 2013-09-10  Mario Sanchez Prada  <mario.prada@samsung.com>
2031
2032         [GTK] Test /webkit/atk/getTextInParagraphAndBodyModerate fails
2033         https://bugs.webkit.org/show_bug.cgi?id=105538
2034
2035         Reviewed by Chris Fleizach.
2036
2037         Expose '\n' for linebreaks when they were explicitly set by the
2038         author of the web content with a <br> tag.
2039
2040         Tests: accessibility/paragraph-with-linebreaks.html
2041
2042         * accessibility/AccessibilityNodeObject.cpp:
2043         (WebCore::shouldAddSpaceBeforeAppendingNextElement): Helper
2044         function to decide when to append spaces when building the text
2045         under an element, considering line breaks.
2046         (WebCore::AccessibilityNodeObject::textUnderElement): Use the
2047         shouldAddSpaceBeforeAppendingNextElement() function here.
2048         * accessibility/AccessibilityRenderObject.cpp:
2049         (WebCore::AccessibilityRenderObject::textUnderElement): Return the
2050         renderer's text for accessibility objects exposing <br> elements.
2051         * html/parser/HTMLParserIdioms.h:
2052         (WebCore::isHTMLSpaceButNotLineBreak): New helper function, useful
2053         to be passed to other functions like simplifyWhiteSpace().
2054
2055 2013-09-10  Arpita Bahuguna  <a.bah@samsung.com>
2056
2057         When deleting editable content, typing style should be reset when moving into another node.
2058         https://bugs.webkit.org/show_bug.cgi?id=120726
2059
2060         Reviewed by Ryosuke Niwa.
2061
2062         When moving from one text node to the other, while deleting characters,
2063         the deleted text node's style was being applied to any new characters
2064         added into the existing text node.
2065
2066         Typing Style in the frame selection maintains the editing style for the
2067         deleted text node, so that if new characters are inserted at the position
2068         of the deleted text node, it's style can be applied to them.
2069
2070         However, when moving into another text node, we should reset or clear the
2071         typing style maintained by the frame selection. This ensures that any new
2072         content inserted within the existing node does not take on any uncleared
2073         style of the deleted node.
2074
2075         Test: editing/deleting/maintain-style-after-delete.html
2076
2077         * editing/DeleteSelectionCommand.cpp:
2078         (WebCore::DeleteSelectionCommand::saveTypingStyleState):
2079         Calling clearTypingStyle() on frame selection whenever deletion occurs
2080         within the same text node. Thus any existing typing styleh held by the
2081         frame selection shall be cleared.
2082
2083 2013-09-09  Darin Adler  <darin@apple.com>
2084
2085         Some refinements in FrameView::layout
2086         https://bugs.webkit.org/show_bug.cgi?id=121076
2087
2088         Reviewed by Andreas Kling.
2089
2090         * page/FrameView.cpp:
2091         (WebCore::FrameView::layout): Use a reference for the document in
2092         this function since code assumes it's non-null anyway. Change code to
2093         only call styleResolverIfExists once. Rewrite comments about blocks
2094         and the scopes they create for better clarity. Make m_nestedLayoutCount
2095         easier to read. Use HTMLElement* for the pointer to the body element.
2096         Moved the call to calculateScrollbarModesForLayout in so we don't
2097         waste time doing it for subtree layouts. Get rid of the unhelpful
2098         currentHMode and currentVMode local variables. Get rid of an extra
2099         block scope we did not need.
2100
2101 2013-09-09  Santosh Mahto  <santosh.ma@samsung.com>
2102
2103         Adding "explicit" keyword in DOM related classes constructor
2104         https://bugs.webkit.org/show_bug.cgi?id=121031
2105
2106         Reviewed by Ryosuke Niwa.
2107
2108         Added the explicit keyword in constructors.
2109
2110         * dom/ActiveDOMObject.h:
2111         * dom/ContainerNode.h:
2112         * dom/DocumentStyleSheetCollection.h:
2113         * dom/ElementAncestorIterator.h:
2114         * dom/ElementData.h:
2115         * dom/ElementRareData.h:
2116         * dom/EventListenerMap.h:
2117         * dom/QualifiedName.h:
2118         (WebCore::QualifiedName::QualifiedName):
2119         * dom/TreeScope.h:
2120         * dom/ViewportArguments.h:
2121         (WebCore::ViewportArguments::ViewportArguments):
2122         * dom/VisitedLinkState.h:
2123
2124 2013-09-09  Andreas Kling  <akling@apple.com>
2125
2126         Remove unreviewed gunk I just accidentally committed :|
2127
2128 2013-09-09  Andreas Kling  <akling@apple.com>
2129
2130         HTMLTextAreaElement no longer needs custom style resolve callbacks.
2131         <https://webkit.org/b/121073>
2132
2133         Reviewed by Ryosuke Niwa.
2134
2135         After r155408 HTMLTextAreaElement doesn't override didAttachRenderer() anymore,
2136         so we don't need to fire callbacks on textarea elements during style resolve.
2137
2138         * html/HTMLTextAreaElement.cpp:
2139         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
2140
2141 2013-09-09  Andreas Kling  <akling@apple.com>
2142
2143         ScriptController should have a Frame& internally.
2144         <https://webkit.org/b/121071>
2145
2146         Reviewed by Anders Carlsson.
2147
2148         Change ScriptController::m_frame to a reference since it's tied to
2149         the lifetime of the owning Frame.
2150
2151 2013-09-09  Andreas Kling  <akling@apple.com>
2152
2153         ScriptRunner should have a Document& internally.
2154         <https://webkit.org/b/121072>
2155
2156         Reviewed by Anders Carlsson.
2157
2158         Change ScriptRunner::m_document to a reference since it's tied to
2159         the lifetime of the Document.
2160
2161 2013-09-09  Andreas Kling  <akling@apple.com>
2162
2163         Ref-ify more stack guards.
2164         <https://webkit.org/b/121070>
2165
2166         Rubber-stamped by Anders Carlsson.
2167
2168         RefPtr<Foo> protect(this) => Ref<Foo> protect(*this).
2169
2170 2013-09-09  Andreas Kling  <akling@apple.com>
2171
2172         Generate more SVG type checks and conversions.
2173         <https://webkit.org/b/121066>
2174
2175         Reviewed by Anders Carlsson.
2176
2177         Switch another slew of SVG elements to auto-generated isFooElement()
2178         and toFooElement() helpers.
2179
2180         Removed now-unnecessary casts and assertions as appropriate.
2181         Converted some simple loops to childrenOfType iteration instead of
2182         traversing child Nodes.
2183
2184         PS. This patch also adds const versions of toFooElement().
2185
2186 2013-09-09  Dean Jackson  <dino@apple.com>
2187
2188         [WebGL] Allow multithreaded OpenGL contexts
2189         https://bugs.webkit.org/show_bug.cgi?id=121062
2190
2191         Reviewed by Simon Fraser.
2192
2193         Expose a new preference "multithreadedWebGLEnabled".
2194
2195         Also examine the value of that preference and, on Mac,
2196         tell the CGLContext that it should go to multithreaded mode.
2197
2198         * html/canvas/WebGLRenderingContext.cpp:
2199         (WebCore::WebGLRenderingContext::create): Look at the value of the new setting, and
2200         toggle a flag on the context attributes.
2201         * page/Settings.in: New Setting "multithreadedWebGLEnabled".
2202         * platform/graphics/GraphicsContext3D.h:
2203         (WebCore::GraphicsContext3D::Attributes::Attributes): Add a "multithreaded" flag.
2204         * platform/graphics/mac/GraphicsContext3DMac.mm:
2205         (WebCore::GraphicsContext3D::GraphicsContext3D): If the context attributes
2206         suggest we should, tell the OpenGL context to go into multithreaded mode.
2207
2208 2013-09-09  Ryosuke Niwa  <rniwa@webkit.org>
2209
2210         Remove HTMLTextFormControl::fixPlaceholderRenderer
2211         https://bugs.webkit.org/show_bug.cgi?id=121058
2212
2213         Reviewed by Kent Tamura.
2214
2215         HTMLTextFormControl::fixPlaceholderRenderer was added in r118733 to swap the order in which placeholder appears.
2216         Namely, when a text form control element is focused, placeholder should be rendered behind the text for the caret
2217         to render on top of, not behind, the placeholder text.  However, we can achieve the same effect by changing
2218         the order of elements in the shadow DOM instead of manually manipuating the render tree as the assertion failure
2219         mentioned in the change log is a bogus one.
2220
2221         Cleaned up the code by removing HTMLTextFormControl::fixPlaceholderRenderer and changed the order in which inner
2222         text element and placeholder element appear. Also fixed the assertion in Position's constructor.
2223
2224         * dom/Position.cpp:
2225         (WebCore::Position::Position): The original assertion was bogus. What we don't want have is for a Position to be
2226         before or after a shadow root. It's fine for it be anchroed against the shadow root as long as it's inside.
2227
2228         * html/HTMLTextAreaElement.cpp:
2229         (WebCore::HTMLTextAreaElement::updatePlaceholderText): Insert the placeholder before the inner text element.
2230         * html/HTMLTextAreaElement.h:
2231         * html/HTMLTextFormControlElement.cpp:
2232         * html/HTMLTextFormControlElement.h:
2233         * html/TextFieldInputType.cpp:
2234         (WebCore::TextFieldInputType::updatePlaceholderText): Ditto.
2235         * html/TextFieldInputType.h:
2236
2237 2013-09-09  Andreas Kling  <akling@apple.com>
2238
2239         Hide node() below RenderSVGModelObject, use element() instead.
2240         <https://webkit.org/b/121051>
2241
2242         Reviewed by Darin Adler.
2243
2244         This was almost already there, just delete node() and add an element() that returns a SVGElement*.
2245         The SVG render tree is crazy casual about compile-time types, this is only scratching the surface.
2246
2247 2013-09-09  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2248
2249         Fixing EFL build
2250         https://bugs.webkit.org/show_bug.cgi?id=121048
2251
2252         Reviewed by Darin Adler.
2253
2254         No new tests needed.
2255
2256         * platform/efl/RenderThemeEfl.cpp:
2257         (WebCore::RenderThemeEfl::applyEdjeRTLState):
2258
2259 2013-09-09  Bem Jones-Bey  <bjonesbe@adobe.com>
2260
2261         Move Floats out of RenderBlock
2262         https://bugs.webkit.org/show_bug.cgi?id=120779
2263
2264         Reviewed by Alexandru Chiculita.
2265
2266         Move FloatingObject, FloatingObjects and related code into
2267         FloatingObjects.{h,cpp}. This not only makes the code more readable
2268         and maintainable, it also will allow for more decoupling of
2269         RenderBlock and the FloatingObjects, hopefully making it possible for
2270         FloatingObjects to be more central and not need to have one for each
2271         RenderBlock that is affected by floats.
2272
2273         No new tests, no behavior change.
2274
2275         * CMakeLists.txt:
2276         * GNUmakefile.list.am:
2277         * Target.pri:
2278         * WebCore.vcxproj/WebCore.vcxproj:
2279         * WebCore.xcodeproj/project.pbxproj:
2280         * rendering/FloatingObjects.cpp: Added.
2281         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
2282         (WebCore::ComputeFloatOffsetAdapter::lowValue):
2283         (WebCore::ComputeFloatOffsetAdapter::highValue):
2284         (WebCore::ComputeFloatOffsetAdapter::outermostFloat):
2285         (WebCore::FloatingObjects::FloatingObjects):
2286         (WebCore::FloatingObjects::~FloatingObjects):
2287         (WebCore::FloatingObjects::clearLineBoxTreePointers):
2288         (WebCore::FloatingObjects::clear):
2289         (WebCore::FloatingObjects::increaseObjectsCount):
2290         (WebCore::FloatingObjects::decreaseObjectsCount):
2291         (WebCore::FloatingObjects::intervalForFloatingObject):
2292         (WebCore::FloatingObjects::addPlacedObject):
2293         (WebCore::FloatingObjects::removePlacedObject):
2294         (WebCore::FloatingObjects::add):
2295         (WebCore::FloatingObjects::remove):
2296         (WebCore::FloatingObjects::computePlacedFloatsTree):
2297         (WebCore::FloatingObjects::logicalLeftOffset):
2298         (WebCore::FloatingObjects::logicalRightOffset):
2299         (WebCore::rangesIntersect):
2300         (WebCore::::updateOffsetIfNeeded):
2301         (WebCore::::collectIfNeeded):
2302         (WebCore::::getHeightRemaining):
2303         (WebCore::::string):
2304         * rendering/FloatingObjects.h: Added.
2305         (WebCore::FloatingObject::FloatingObject):
2306         (WebCore::FloatingObject::clone):
2307         (WebCore::FloatingObject::type):
2308         (WebCore::FloatingObject::renderer):
2309         (WebCore::FloatingObject::isPlaced):
2310         (WebCore::FloatingObject::setIsPlaced):
2311         (WebCore::FloatingObject::x):
2312         (WebCore::FloatingObject::maxX):
2313         (WebCore::FloatingObject::y):
2314         (WebCore::FloatingObject::maxY):
2315         (WebCore::FloatingObject::width):
2316         (WebCore::FloatingObject::height):
2317         (WebCore::FloatingObject::setX):
2318         (WebCore::FloatingObject::setY):
2319         (WebCore::FloatingObject::setWidth):
2320         (WebCore::FloatingObject::setHeight):
2321         (WebCore::FloatingObject::frameRect):
2322         (WebCore::FloatingObject::setFrameRect):
2323         (WebCore::FloatingObject::paginationStrut):
2324         (WebCore::FloatingObject::setPaginationStrut):
2325         (WebCore::FloatingObject::isInPlacedTree):
2326         (WebCore::FloatingObject::setIsInPlacedTree):
2327         (WebCore::FloatingObject::shouldPaint):
2328         (WebCore::FloatingObject::setShouldPaint):
2329         (WebCore::FloatingObject::isDescendant):
2330         (WebCore::FloatingObject::setIsDescendant):
2331         (WebCore::FloatingObject::setRenderer):
2332         (WebCore::FloatingObject::originatingLine):
2333         (WebCore::FloatingObject::setOriginatingLine):
2334         (WebCore::FloatingObject::logicalTop):
2335         (WebCore::FloatingObject::logicalBottom):
2336         (WebCore::FloatingObject::logicalLeft):
2337         (WebCore::FloatingObject::logicalRight):
2338         (WebCore::FloatingObject::logicalWidth):
2339         (WebCore::FloatingObject::pixelSnappedLogicalTop):
2340         (WebCore::FloatingObject::pixelSnappedLogicalBottom):
2341         (WebCore::FloatingObject::pixelSnappedLogicalLeft):
2342         (WebCore::FloatingObject::pixelSnappedLogicalRight):
2343         (WebCore::FloatingObject::setLogicalTop):
2344         (WebCore::FloatingObject::setLogicalLeft):
2345         (WebCore::FloatingObject::setLogicalHeight):
2346         (WebCore::FloatingObject::setLogicalWidth):
2347         (WebCore::FloatingObjectHashFunctions::hash):
2348         (WebCore::FloatingObjectHashFunctions::equal):
2349         (WebCore::FloatingObjectHashTranslator::hash):
2350         (WebCore::FloatingObjectHashTranslator::equal):
2351         (WebCore::FloatingObjects::setHorizontalWritingMode):
2352         (WebCore::FloatingObjects::hasLeftObjects):
2353         (WebCore::FloatingObjects::hasRightObjects):
2354         (WebCore::FloatingObjects::set):
2355         (WebCore::FloatingObjects::placedFloatsTree):
2356         * rendering/RenderBlock.cpp:
2357         (WebCore::RenderBlock::RenderBlock):
2358         (WebCore::RenderBlock::insertFloatingObject):
2359         * rendering/RenderBlock.h:
2360         * rendering/RenderBlockLineLayout.cpp:
2361         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2362         (WebCore::LineLayoutState::lastFloat):
2363         (WebCore::LineLayoutState::setLastFloat):
2364         * rendering/RenderView.cpp:
2365         (WebCore::RenderView::intervalArena):
2366
2367 2013-09-09  David Hyatt  <hyatt@apple.com>
2368
2369         REGRESSION (r155377): Convert the media elements that were RenderBlocks to RenderBlockFlows
2370         https://bugs.webkit.org/show_bug.cgi?id=121052
2371
2372         Reviewed by Anders Carlsson.
2373
2374         Convert a couple of media renderers that I missed from RenderBlock to RenderBlockFlow.
2375         The previous patch that I landed added asserts that get triggered now when this
2376         situation occurs.
2377
2378         * rendering/RenderMediaControlElements.cpp:
2379         (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
2380         (WebCore::RenderMediaVolumeSliderContainer::layout):
2381         (WebCore::RenderTextTrackContainerElement::RenderTextTrackContainerElement):
2382         (WebCore::RenderTextTrackContainerElement::layout):
2383         * rendering/RenderMediaControlElements.h:
2384
2385 2013-09-09  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2386
2387         [Bug Fix] Calling m_audioComponents.remove in removeAudioComponent (MediaStreamDescriptor)
2388         https://bugs.webkit.org/show_bug.cgi?id=121034
2389
2390         Reviewed by Eric Carlson.
2391
2392         No new tests needed.
2393
2394         * platform/mediastream/MediaStreamDescriptor.h:
2395         (WebCore::MediaStreamDescriptor::removeAudioComponent):
2396
2397 2013-09-09  Anders Carlsson  <andersca@apple.com>
2398
2399         Stop using WTF type traits in WebCore
2400         https://bugs.webkit.org/show_bug.cgi?id=121042
2401
2402         Reviewed by Andreas Kling.
2403
2404         Replace uses of WTF type traits in CrossThreadCopier with a simpler solution
2405         that uses std::is_convertible_to and some helpers.
2406
2407         * dom/CrossThreadTask.h:
2408         * platform/CrossThreadCopier.h:
2409         * platform/MainThreadTask.h:
2410
2411 2013-09-06  Ryosuke Niwa  <rniwa@webkit.org>
2412
2413         Internals should always cause a layout before calling into TextIterator
2414         https://bugs.webkit.org/show_bug.cgi?id=120891
2415
2416         Reviewed by Antti Koivisto.
2417
2418         Inspired by https://chromium.googlesource.com/chromium/blink/+/5fee5da7b04a710171c79bd6e87eca3533188e45.
2419
2420         Force a layout in the constructors of TextIterator, and SimplifiedBackwardsTextIterator and remove
2421         superfluous calls to updateLayout() in other places.
2422
2423         As much as I hate for a constructor to have a side effect like this, I couldn't think of a better place
2424         to update the layout. Unfortunately, we're slowly moving away from manually createing TextIterator and
2425         wrapping them in a static function.
2426
2427         * editing/TextIterator.cpp:
2428         (WebCore::TextIterator::TextIterator):
2429         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
2430         (WebCore::TextIterator::rangeFromLocationAndLength):
2431         (WebCore::findPlainText):
2432
2433 2013-09-09  David Hyatt  <hyatt@apple.com>
2434
2435         Move layoutBlock and layoutBlockChildren into RenderBlockFlow
2436         https://bugs.webkit.org/show_bug.cgi?id=121036
2437
2438         Reviewed by Dean Jackson.
2439
2440         Move layoutBlock into RenderBlockFlow and make the base class version of
2441         the method ASSERT_NOT_REACHED. Begin the process of moving block layout 
2442         into RenderBlockFlow by putting layoutBlockChildren there as well.
2443         
2444         This patch also puts clearFloats into RenderBlockFlow and just ditches the
2445         SVG-specific forceLayoutInlineChildren by letting RenderSVGText do what it
2446         needs in its own file.
2447
2448         Convert RenderListBox to be a RenderBlockFlow, since this is necessary for it
2449         to get the correct layoutBlock method.
2450         
2451         Patch RenderRegion to call RenderBlockFlow::layoutBlock rather than RenderBlock::layoutBlock.
2452         
2453         Fix run-ins so that they create block flows rather than blocks, and restrict run-ins to
2454         only be block flows.
2455
2456         * rendering/RenderBlock.cpp:
2457         (WebCore::RenderBlock::layoutBlock):
2458         (WebCore::RenderBlock::createReplacementRunIn):
2459         (WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
2460         * rendering/RenderBlock.h:
2461         * rendering/RenderBlockFlow.cpp:
2462         (WebCore::RenderBlockFlow::clearFloats):
2463         (WebCore::RenderBlockFlow::layoutBlock):
2464         (WebCore::RenderBlockFlow::layoutBlockChildren):
2465         * rendering/RenderBlockFlow.h:
2466         * rendering/RenderBlockLineLayout.cpp:
2467         (WebCore::RenderBlockFlow::layoutInlineChildren):
2468         * rendering/RenderListBox.cpp:
2469         (WebCore::RenderListBox::RenderListBox):
2470         (WebCore::RenderListBox::layout):
2471         (WebCore::RenderListBox::paintObject):
2472         (WebCore::RenderListBox::addFocusRingRects):
2473         (WebCore::RenderListBox::nodeAtPoint):
2474         * rendering/RenderListBox.h:
2475         * rendering/RenderRegion.cpp:
2476         (WebCore::RenderRegion::paintObject):
2477         (WebCore::RenderRegion::styleDidChange):
2478         (WebCore::RenderRegion::layoutBlock):
2479         (WebCore::RenderRegion::insertedIntoTree):
2480         (WebCore::RenderRegion::willBeRemovedFromTree):
2481         (WebCore::RenderRegion::computeIntrinsicLogicalWidths):
2482         (WebCore::RenderRegion::computePreferredLogicalWidths):
2483         (WebCore::RenderRegion::updateLogicalHeight):
2484         * rendering/RenderTextControlSingleLine.cpp:
2485         (WebCore::RenderTextControlSingleLine::layout):
2486         * rendering/svg/RenderSVGText.cpp:
2487         (WebCore::RenderSVGText::layout):
2488
2489 2013-09-09  Antti Koivisto  <antti@apple.com>
2490
2491         Try to fix GTK build.
2492         
2493         Not reviewed.
2494
2495         * accessibility/AccessibilityTable.cpp:
2496         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
2497
2498 2013-09-09  Antti Koivisto  <antti@apple.com>
2499
2500         Hide node() below RenderLayerModelObject, use element() instead
2501         https://bugs.webkit.org/show_bug.cgi?id=121038
2502
2503         Reviewed by Dave Hyatt.
2504
2505         Switch all call sites to element(). Remove now unnecessary casts, type checks and dead code.
2506         Make constructors below RenderLayerModelObject take an Element instead of a ContainerNode.
2507         
2508         This also removes a branch from many hasTagName() and isFooElement() calls.
2509
2510         * accessibility/AccessibilityRenderObject.cpp:
2511         (WebCore::startOfContinuations):
2512         * accessibility/AccessibilityTable.cpp:
2513         (WebCore::AccessibilityTable::isDataTable):
2514         * accessibility/AccessibilityTableCell.cpp:
2515         (WebCore::AccessibilityTableCell::titleUIElement):
2516         * accessibility/AccessibilityTableColumn.cpp:
2517         (WebCore::AccessibilityTableColumn::headerObjectForSection):
2518         * editing/markup.cpp:
2519         (WebCore::highestAncestorToWrapMarkup):
2520         * html/HTMLTableCellElement.cpp:
2521         (WebCore::HTMLTableCellElement::cellAbove):
2522         * html/shadow/SliderThumbElement.cpp:
2523         (WebCore::RenderSliderThumb::updateAppearance):
2524         (WebCore::RenderSliderContainer::computeLogicalHeight):
2525         (WebCore::RenderSliderContainer::layout):
2526         * page/Frame.cpp:
2527         (WebCore::Frame::frameForWidget):
2528         * rendering/RenderBlock.cpp:
2529         (WebCore::OverflowEventDispatcher::~OverflowEventDispatcher):
2530         (WebCore::RenderBlock::RenderBlock):
2531         (WebCore::RenderBlock::clone):
2532         (WebCore::RenderBlock::createReplacementRunIn):
2533         (WebCore::RenderBlock::paintObject):
2534         (WebCore::RenderBlock::isSelectionRoot):
2535         (WebCore::RenderBlock::nodeForHitTest):
2536         (WebCore::RenderBlock::hasLineIfEmpty):
2537         (WebCore::RenderBlock::addFocusRingRects):
2538         * rendering/RenderBlock.h:
2539         * rendering/RenderBlockFlow.cpp:
2540         (WebCore::RenderBlockFlow::RenderBlockFlow):
2541         * rendering/RenderBlockFlow.h:
2542         * rendering/RenderBlockLineLayout.cpp:
2543         (WebCore::RenderBlock::addOverflowFromInlineChildren):
2544         * rendering/RenderBox.cpp:
2545         (WebCore::RenderBox::RenderBox):
2546         (WebCore::RenderBox::updateFromStyle):
2547         (WebCore::RenderBox::scroll):
2548         (WebCore::RenderBox::logicalScroll):
2549         (WebCore::RenderBox::canBeProgramaticallyScrolled):
2550         (WebCore::RenderBox::nodeAtPoint):
2551         (WebCore::RenderBox::paintCustomHighlight):
2552         (WebCore::RenderBox::computeLogicalWidthInRegion):
2553         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
2554         (WebCore::RenderBox::localCaretRect):
2555         * rendering/RenderBox.h:
2556         * rendering/RenderBoxModelObject.cpp:
2557         (WebCore::RenderBoxModelObject::RenderBoxModelObject):
2558         * rendering/RenderBoxModelObject.h:
2559         * rendering/RenderButton.cpp:
2560         (WebCore::RenderButton::updateFromElement):
2561         (WebCore::RenderButton::canHaveGeneratedChildren):
2562         * rendering/RenderButton.h:
2563         * rendering/RenderEmbeddedObject.cpp:
2564         (WebCore::RenderEmbeddedObject::paintContents):
2565         (WebCore::RenderEmbeddedObject::isReplacementObscured):
2566         (WebCore::RenderEmbeddedObject::layout):
2567         (WebCore::RenderEmbeddedObject::viewCleared):
2568         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
2569         * rendering/RenderFileUploadControl.cpp:
2570         (WebCore::RenderFileUploadControl::updateFromElement):
2571         (WebCore::RenderFileUploadControl::maxFilenameWidth):
2572         (WebCore::RenderFileUploadControl::paintObject):
2573         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
2574         (WebCore::RenderFileUploadControl::uploadButton):
2575         (WebCore::RenderFileUploadControl::fileTextValue):
2576         * rendering/RenderFrame.cpp:
2577         (WebCore::RenderFrame::edgeInfo):
2578         (WebCore::RenderFrame::viewCleared):
2579         * rendering/RenderFrameBase.cpp:
2580         (WebCore::RenderFrameBase::layoutWithFlattening):
2581         * rendering/RenderFrameSet.cpp:
2582         (WebCore::RenderFrameSet::frameSet):
2583         * rendering/RenderHTMLCanvas.cpp:
2584         (WebCore::RenderHTMLCanvas::requiresLayer):
2585         (WebCore::RenderHTMLCanvas::paintReplaced):
2586         (WebCore::RenderHTMLCanvas::canvasSizeChanged):
2587         * rendering/RenderIFrame.cpp:
2588         (WebCore::RenderIFrame::isSeamless):
2589         (WebCore::RenderIFrame::flattenFrame):
2590         * rendering/RenderImage.cpp:
2591         (WebCore::RenderImage::imageChanged):
2592         (WebCore::RenderImage::paintAreaElementFocusRing):
2593         (WebCore::RenderImage::areaElementFocusChanged):
2594         (WebCore::RenderImage::paintIntoRect):
2595         (WebCore::RenderImage::imageMap):
2596         (WebCore::RenderImage::nodeAtPoint):
2597         (WebCore::RenderImage::updateAltText):
2598         * rendering/RenderInline.cpp:
2599         (WebCore::RenderInline::clone):
2600         (WebCore::RenderInline::hitTestCulledInline):
2601         (WebCore::RenderInline::updateHitTestResult):
2602         * rendering/RenderInline.h:
2603         * rendering/RenderLayer.cpp:
2604         (WebCore::RenderLayer::RenderLayer):
2605         (WebCore::RenderLayer::~RenderLayer):
2606         (WebCore::RenderLayer::name):
2607         (WebCore::RenderLayer::isTransparent):
2608         (WebCore::RenderLayer::scrollTo):
2609         (WebCore::RenderLayer::resize):
2610         (WebCore::RenderLayer::filterNeedsRepaint):
2611         * rendering/RenderLayerBacking.cpp:
2612         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2613         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2614         * rendering/RenderLayerCompositor.cpp:
2615         (WebCore::RenderLayerCompositor::frameContentsCompositor):
2616         * rendering/RenderLayerFilterInfo.cpp:
2617         (WebCore::RenderLayer::FilterInfo::notifyFinished):
2618         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
2619         (WebCore::RenderLayer::FilterInfo::notifyCustomFilterProgramLoaded):
2620         * rendering/RenderLayerModelObject.cpp:
2621         (WebCore::RenderLayerModelObject::RenderLayerModelObject):
2622         * rendering/RenderLayerModelObject.h:
2623         (WebCore::RenderLayerModelObject::element):
2624         * rendering/RenderListBox.cpp:
2625         (WebCore::RenderListBox::selectElement):
2626         (WebCore::RenderListBox::paintItemForeground):
2627         (WebCore::RenderListBox::paintItemBackground):
2628         (WebCore::RenderListBox::scrollTo):
2629         (WebCore::RenderListBox::createScrollbar):
2630         * rendering/RenderListItem.cpp:
2631         (WebCore::isList):
2632         (WebCore::enclosingList):
2633         (WebCore::nextListItem):
2634         (WebCore::previousListItem):
2635         (WebCore::RenderListItem::calcValue):
2636         (WebCore::RenderListItem::explicitValueChanged):
2637         (WebCore::RenderListItem::setExplicitValue):
2638         (WebCore::RenderListItem::clearExplicitValue):
2639         (WebCore::previousOrNextItem):
2640         (WebCore::RenderListItem::updateListMarkerNumbers):
2641         * rendering/RenderMarquee.cpp:
2642         (WebCore::RenderMarquee::marqueeSpeed):
2643         * rendering/RenderMedia.cpp:
2644         (WebCore::RenderMedia::mediaElement):
2645         * rendering/RenderMediaControlElements.cpp:
2646         (WebCore::RenderMediaControlTimelineContainer::layout):
2647         (WebCore::RenderTextTrackContainerElement::layout):
2648         * rendering/RenderMenuList.cpp:
2649         (WebCore::RenderMenuList::selectElement):
2650         (WebCore::RenderMenuList::valueChanged):
2651         (WebCore::RenderMenuList::createScrollbar):
2652         * rendering/RenderMeter.cpp:
2653         (WebCore::RenderMeter::meterElement):
2654         * rendering/RenderPart.cpp:
2655         (WebCore::RenderPart::requiresAcceleratedCompositing):
2656         (WebCore::RenderPart::embeddedContentBox):
2657         * rendering/RenderProgress.cpp:
2658         (WebCore::RenderProgress::progressElement):
2659         * rendering/RenderReplaced.cpp:
2660         (WebCore::RenderReplaced::positionForPoint):
2661         (WebCore::RenderReplaced::isSelected):
2662         * rendering/RenderSearchField.cpp:
2663         (WebCore::RenderSearchField::autosaveName):
2664         (WebCore::RenderSearchField::createScrollbar):
2665         * rendering/RenderSlider.cpp:
2666         (WebCore::RenderSlider::layout):
2667         (WebCore::RenderSlider::inDragMode):
2668         * rendering/RenderSnapshottedPlugIn.cpp:
2669         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
2670         * rendering/RenderTable.cpp:
2671         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
2672         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2673         (WebCore::RenderTable::nodeAtPoint):
2674         * rendering/RenderTableCell.cpp:
2675         (WebCore::RenderTableCell::parseColSpanFromDOM):
2676         (WebCore::RenderTableCell::parseRowSpanFromDOM):
2677         (WebCore::RenderTableCell::updateColAndRowSpanFlags):
2678         (WebCore::RenderTableCell::colSpanOrRowSpanChanged):
2679         (WebCore::RenderTableCell::computePreferredLogicalWidths):
2680         * rendering/RenderTableCol.cpp:
2681         (WebCore::RenderTableCol::updateFromElement):
2682         * rendering/RenderTextControl.cpp:
2683         (WebCore::RenderTextControl::textFormControlElement):
2684         (WebCore::RenderTextControl::adjustInnerTextStyle):
2685         (WebCore::RenderTextControl::updateFromElement):
2686         (WebCore::RenderTextControl::layoutSpecialExcludedChild):
2687         * rendering/RenderTextControlMultiLine.cpp:
2688         (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
2689         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
2690         (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
2691         (WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
2692         * rendering/RenderTextControlSingleLine.cpp:
2693         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
2694         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
2695         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
2696         (WebCore::RenderTextControlSingleLine::inputElement):
2697         * rendering/RenderThemeMac.mm:
2698         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2699         * rendering/RenderTreeAsText.cpp:
2700         (WebCore::writeRenderRegionList):
2701         * rendering/RenderVideo.cpp:
2702         (WebCore::RenderVideo::updateIntrinsicSize):
2703         (WebCore::RenderVideo::videoElement):
2704         * rendering/RenderWidget.cpp:
2705         (WebCore::RenderWidget::setWidgetGeometry):
2706         (WebCore::RenderWidget::updateWidgetPosition):
2707         (WebCore::RenderWidget::nodeAtPoint):
2708         * rendering/mathml/RenderMathMLFenced.cpp:
2709         (WebCore::RenderMathMLFenced::updateFromElement):
2710         (WebCore::RenderMathMLFenced::createMathMLOperator):
2711         (WebCore::RenderMathMLFenced::styleDidChange):
2712         * rendering/mathml/RenderMathMLFraction.cpp:
2713         (WebCore::RenderMathMLFraction::updateFromElement):
2714         * rendering/mathml/RenderMathMLOperator.cpp:
2715         (WebCore::RenderMathMLOperator::updateFromElement):
2716         (WebCore::RenderMathMLOperator::createGlyph):
2717         * rendering/mathml/RenderMathMLSpace.cpp:
2718         (WebCore::RenderMathMLSpace::updateFromElement):
2719         * rendering/svg/RenderSVGForeignObject.cpp:
2720         (WebCore::RenderSVGForeignObject::layout):
2721         * rendering/svg/RenderSVGRoot.cpp:
2722         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
2723         (WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage):
2724         (WebCore::RenderSVGRoot::isEmbeddedThroughFrameContainingSVGDocument):
2725         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
2726         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2727         (WebCore::RenderSVGRoot::layout):
2728         (WebCore::RenderSVGRoot::paintReplaced):
2729         (WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
2730         (WebCore::RenderSVGRoot::nodeAtPoint):
2731         (WebCore::RenderSVGRoot::hasRelativeDimensions):
2732         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
2733         (WebCore::RenderSVGRoot::hasRelativeLogicalHeight):
2734         * rendering/svg/RenderSVGText.cpp:
2735         (WebCore::RenderSVGText::layout):
2736         (WebCore::RenderSVGText::strokeBoundingBox):
2737         * rendering/svg/RenderSVGTextPath.cpp:
2738         (WebCore::RenderSVGTextPath::layoutPath):
2739         (WebCore::RenderSVGTextPath::startOffset):
2740         (WebCore::RenderSVGTextPath::exactAlignment):
2741         (WebCore::RenderSVGTextPath::stretchMethod):
2742
2743 2013-09-09  Antti Koivisto  <antti@apple.com>
2744
2745         Make RenderView anonymous
2746         https://bugs.webkit.org/show_bug.cgi?id=121013
2747
2748         Reviewed by Darin Adler and Dave Hyatt.
2749
2750         RenderView is currently the only renderer that has an associated Node that is not either Element or Text.
2751         By making it anonymous (not have associated node, RenderView::node() returns null) we will be able to 
2752         significantly tighten typing in both render and DOM trees.
2753
2754         * accessibility/AccessibilityRenderObject.cpp:
2755         (WebCore::AccessibilityRenderObject::node):
2756         
2757             We need to grab document() instead of node() in a few places for RenderViews to keep existing code
2758             behaving like it did.
2759
2760         * inspector/InspectorLayerTreeAgent.cpp:
2761         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2762         
2763             Don't tell inspector that the root layer is anonymous for now to avoid changing behavior.
2764
2765         * rendering/RenderBlock.cpp:
2766         (WebCore::RenderBlock::nodeForHitTest):
2767         * rendering/RenderBox.cpp:
2768         (WebCore::RenderBox::canBeProgramaticallyScrolled):
2769         
2770             The old non-virtual RenderView test renderer->node == &renderer->document() does not work anymore.
2771             Switch to isRenderView() which is now non-virtual in a number of places.
2772
2773         (WebCore::RenderBox::canAutoscroll):
2774         (WebCore::RenderBox::findAutoscrollable):
2775         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2776         * rendering/RenderBoxModelObject.cpp:
2777         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
2778         * rendering/RenderLayerBacking.cpp:
2779         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2780         * rendering/RenderObject.h:
2781         (WebCore::RenderObject::isRenderReplaced):
2782         (WebCore::RenderObject::isAnonymousBlock):
2783         
2784             RenderView is anonymous but not a CSS anonymous block.
2785
2786         (WebCore::RenderObject::isText):
2787         (WebCore::RenderObject::isRenderView):
2788         
2789             Make isRenderView non-virtual since it is now hot. Reuse existing bits.
2790
2791         (WebCore::RenderObject::setIsText):
2792         (WebCore::RenderObject::setIsRenderView):
2793         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2794         * rendering/RenderTreeAsText.cpp:
2795         (WebCore::writeSelection):
2796         * rendering/RenderView.cpp:
2797         
2798             Make anonymous.
2799
2800         (WebCore::RenderView::RenderView):
2801         * rendering/RenderView.h:
2802         * rendering/svg/RenderSVGRoot.cpp:
2803         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2804
2805 2013-09-09  Bem Jones-Bey  <bjonesbe@adobe.com>
2806
2807         Move logical(Left|Right)FloatOffsetForLine methods into FloatingObjects
2808         https://bugs.webkit.org/show_bug.cgi?id=120705
2809
2810         Reviewed by Sam Weinig.
2811
2812         These are the only consumers of the CalculateFloatOffsetAdapter and
2813         the placed floats tree, so it will allow us to reduce the public
2814         interface of FloatingObjects and make the placed floats tree private.
2815
2816         No new tests, no behavior change.
2817
2818         * rendering/RenderBlock.cpp:
2819         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
2820         (WebCore::RenderBlock::logicalRightFloatOffsetForLine):
2821         (WebCore::RenderBlock::FloatingObjects::logicalLeftOffset):
2822         (WebCore::RenderBlock::FloatingObjects::logicalRightOffset):
2823         * rendering/RenderBlock.h:
2824         (WebCore::RenderBlock::FloatingObjects::placedFloatsTree):
2825
2826 2013-09-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2827
2828         Add support for BeforeUnloadEvent interface
2829         https://bugs.webkit.org/show_bug.cgi?id=120849
2830
2831         Reviewed by Darin Adler.
2832
2833         Add support for BeforeUnloadEvent as per the specification:
2834         http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent
2835
2836         BeforeUnloadEvent has a returnValue attribute. Setting returnValue to a non-empty
2837         string in an event handler causes the user agent should ask the user to confirm
2838         that they wish to unload the document. This is equivalent to returning a non-empty
2839         string in the EventHandler:
2840         http://www.whatwg.org/specs/web-apps/current-work/#onbeforeunloadeventhandler
2841
2842         BeforeUnloadEvent and returnValue are already supported by IE and Firefox. Previously,
2843         WebKit was passing a base Event type to the beforeunload event handlers instead of
2844         a BeforeUnloadEvent.
2845
2846         Note that this patch keeps support for the legacy Event.returnValue attribute. This used
2847         to be an IE extension but this is no longer supported by IE (nor Firefox). The standard
2848         preventDefault() should be used instead however (supported in IE >= 9).
2849
2850         Test: fast/events/before-unload-returnValue.html
2851
2852         * CMakeLists.txt:
2853         * DerivedSources.cpp:
2854         * DerivedSources.make:
2855         * DerivedSources.pri:
2856         * GNUmakefile.list.am:
2857         * WebCore.order:
2858         * WebCore.vcxproj/WebCore.vcxproj:
2859         * bindings/js/JSEventListener.cpp:
2860         (WebCore::JSEventListener::handleEvent):
2861         * dom/BeforeUnloadEvent.cpp:
2862         (WebCore::BeforeUnloadEvent::isBeforeUnloadEvent):
2863         (WebCore::BeforeUnloadEvent::~BeforeUnloadEvent):
2864         * dom/BeforeUnloadEvent.h:
2865         (WebCore::BeforeUnloadEvent::create):
2866         (WebCore::BeforeUnloadEvent::returnValue):
2867         (WebCore::BeforeUnloadEvent::setReturnValue):
2868         (WebCore::toBeforeUnloadEvent):
2869         * dom/BeforeUnloadEvent.idl: Added.
2870         * dom/Event.cpp:
2871         (WebCore::Event::isBeforeUnloadEvent):
2872         * dom/Event.h:
2873         (WebCore::Event::legacyReturnValue):
2874         (WebCore::Event::setLegacyReturnValue):
2875         * dom/Event.idl:
2876         * dom/EventNames.in:
2877         * loader/FrameLoader.cpp:
2878         (WebCore::FrameLoader::handleBeforeUnloadEvent):
2879
2880 2013-09-06  David Hyatt  <hyatt@apple.com>
2881
2882         Get rid of isBlockFlowFlexBoxOrGrid().
2883         https://bugs.webkit.org/show_bug.cgi?id=120897
2884
2885         Convert all callers and get rid of this method.
2886
2887         Reviewed by Beth Dakin.
2888
2889         * accessibility/AccessibilityRenderObject.cpp:
2890         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2891         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2892         * dom/Position.cpp:
2893         (WebCore::Position::isCandidate):
2894         (WebCore::Position::getInlineBoxAndOffset):
2895         (WebCore::Position::primaryDirection):
2896         * dom/PositionIterator.cpp:
2897         (WebCore::PositionIterator::isCandidate):
2898         * editing/CompositeEditCommand.cpp:
2899         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
2900         * editing/Editor.cpp:
2901         (WebCore::Editor::baseWritingDirectionForSelectionStart):
2902         * editing/FrameSelection.cpp:
2903         (WebCore::caretRenderer):
2904         * editing/TextIterator.cpp:
2905         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
2906         * editing/TypingCommand.cpp:
2907         (WebCore::TypingCommand::makeEditableRootEmpty):
2908         * editing/htmlediting.cpp:
2909         (WebCore::isBlockFlowElement):
2910         * rendering/LayoutState.cpp:
2911         (WebCore::LayoutState::LayoutState):
2912         * rendering/RenderBlock.cpp:
2913         (WebCore::RenderBlock::layoutBlock):
2914         (WebCore::RenderBlock::collapseMargins):
2915         (WebCore::RenderBlock::selectionGaps):
2916         (WebCore::RenderBlock::firstLineBoxBaseline):
2917         (WebCore::RenderBlock::lastLineBoxBaseline):
2918         (WebCore::RenderBlock::firstLineBlock):
2919         (WebCore::findFirstLetterBlock):
2920         (WebCore::shouldCheckLines):
2921         (WebCore::RenderBlock::adjustForBorderFit):
2922         * rendering/RenderBox.cpp:
2923         (WebCore::RenderBox::computeRectForRepaint):
2924         (WebCore::RenderBox::positionForPoint):
2925         * rendering/RenderBoxModelObject.h:
2926         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
2927         * rendering/RenderInline.cpp:
2928         (WebCore::RenderInline::computeRectForRepaint):
2929         * rendering/RenderLineBoxList.cpp:
2930         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
2931         * rendering/RenderObject.cpp:
2932         (WebCore::RenderObject::computeRectForRepaint):
2933         (WebCore::RenderObject::styleWillChange):
2934         (WebCore::firstLineStyleForCachedUncachedType):
2935         * rendering/RenderObject.h:
2936         * rendering/RenderObjectChildList.cpp:
2937         (WebCore::RenderObjectChildList::insertChildNode):
2938         * rendering/RenderView.h:
2939
2940 2013-09-09  Eric Carlson  <eric.carlson@apple.com>
2941
2942         MediaStream API: Stop means stop
2943         https://bugs.webkit.org/show_bug.cgi?id=120873
2944
2945         Reviewed by Jer Noble.
2946
2947         Merge blink https://chromium.googlesource.com/chromium/blink/+/9a97b0f3892320fa5741485e06a78183b77c3635
2948         by Tommy Widenflycht.
2949
2950         Removing notification functionality from MediaStreamTrack::stop because the world is being torn down.
2951
2952         No new tests, the original author was unable to come up with a reliable test case.
2953
2954         * Modules/mediastream/MediaStreamTrack.cpp:
2955         (WebCore::MediaStreamTrack::stop): Don't call didEndTrack, the world is going away.
2956
2957 2013-09-09  Filip Pizlo  <fpizlo@apple.com>
2958
2959         Unreviewed, fix build.
2960
2961         * Modules/encryptedmedia/MediaKeySession.h:
2962
2963 2013-09-09  Eric Carlson  <eric.carlson@apple.com>
2964
2965         MediaStream API: Moving Add/Remove track from WebMediaStreamCenterClient to WebMediaStream
2966         https://bugs.webkit.org/show_bug.cgi?id=120872
2967
2968         Reviewed by Jer Noble.
2969
2970         Merge https://chromium.googlesource.com/chromium/blink/+/7d740fd27c1f345b59c846df01c3adce53c18e6e
2971         Simple cleanup that makes the API cleaner.
2972
2973         * Modules/mediastream/MediaStream.cpp:
2974         (WebCore::MediaStream::removeTrack):
2975         (WebCore::MediaStream::addRemoteTrack):
2976         (WebCore::MediaStream::removeRemoteTrack):
2977         * platform/mediastream/MediaStreamCenter.cpp:
2978         * platform/mediastream/MediaStreamCenter.h:
2979         * platform/mediastream/MediaStreamDescriptor.h:
2980         (WebCore::MediaStreamDescriptor::removeAudioComponent):
2981         (WebCore::MediaStreamDescriptor::addRemoteTrack):
2982         (WebCore::MediaStreamDescriptor::removeRemoteTrack):
2983
2984 2013-09-09  ChangSeok Oh  <changseok.oh@collabora.com>
2985
2986         [WK2] Assertion failure in WebCore::Page::checkSubframeCountConsistency when going back
2987         https://bugs.webkit.org/show_bug.cgi?id=119781
2988
2989         Reviewed by Alexey Proskuryakov.
2990
2991         We should pair restoring a cached frame and adding it to FrameTree so that
2992         actual added frame count in FrameTree keeps same with restored frame count.
2993         Otherwise assert failure occurs in Page::CheckSubframeCountConsistency.
2994         We have added cached frames to FrameTree ahead and then restored them by tree travelsal.
2995         But this way doesn't guarantee subframecount of Page and the number of child of FrameTree are equal.
2996         In addition, we still make sure that adding a cached frame to FrameTree should happen
2997         before opening it. Because FrameTree might be used while restoring a cached page.
2998
2999         Test: fast/history/go-back-to-iframe-with-plugin.html
3000
3001         * history/CachedFrame.cpp:
3002         (WebCore::CachedFrameBase::restore):
3003         (WebCore::CachedFrame::open):
3004
3005 2013-09-09  Luciano Wolf  <luciano.wolf@openbossa.org>
3006
3007         Nix upstreaming - Adding stubs and Nix specific platform files
3008         https://bugs.webkit.org/show_bug.cgi?id=118358
3009
3010         Reviewed by Benjamin Poulain.
3011
3012         Basically adding all files that have "Nix" in their names and
3013         are related to WebCore module.
3014
3015         No new tests. They will be uploaded on another patch during the
3016         upstreaming process.
3017
3018         * css/mediaControlsNix.css: Added.
3019         * css/mediaControlsNixFullscreen.css: Added.
3020         * page/nix/EventHandlerNix.cpp: Added.
3021         * platform/graphics/egl/GLContextFromCurrentEGL.cpp: Added.
3022         * platform/graphics/egl/GLContextFromCurrentEGL.h: Added.
3023         * platform/graphics/gstreamer/PlatformVideoWindowNix.cpp: Added.
3024         * platform/graphics/nix/IconNix.cpp: Added.
3025         * platform/graphics/nix/ImageNix.cpp: Added.
3026         * platform/nix/CursorNix.cpp: Added.
3027         * platform/nix/DragDataNix.cpp: Added.
3028         * platform/nix/DragImageNix.cpp: Added.
3029         * platform/nix/GamepadsNix.cpp: Added.
3030         * platform/nix/LanguageNix.cpp: Added.
3031         * platform/nix/LocalizedStringsNix.cpp: Added.
3032         * platform/nix/NixKeyboardUtilities.cpp: Added.
3033         * platform/nix/NixKeyboardUtilities.h: Added.
3034         * platform/nix/PasteboardNix.cpp: Added.
3035         * platform/nix/PlatformKeyboardEventNix.cpp: Added.
3036         * platform/nix/PlatformScreenNix.cpp: Added.
3037         * platform/nix/SoundNix.cpp: Added.
3038         * platform/nix/WidgetNix.cpp: Added.
3039         * platform/text/nix/TextBreakIteratorInternalICUNix.cpp: Added.
3040
3041 2013-09-09  Hugo Parente Lima  <hugo.lima@openbossa.org>
3042
3043         Preparing WebCore to receive Nix Port
3044         https://bugs.webkit.org/show_bug.cgi?id=118326
3045
3046         Reviewed by Eric Carlson.
3047
3048         Only adding the compilation directives that are Nix specific, in the
3049         existent WebCore files
3050
3051         * loader/FrameLoader.cpp:
3052         (WebCore::FrameLoader::defaultObjectContentType):
3053         * platform/Cursor.h:
3054         * platform/DragData.h:
3055         * platform/DragImage.h:
3056         * platform/FileSystem.h:
3057         * platform/RunLoop.h:
3058         * platform/Widget.h:
3059         * platform/audio/FFTFrame.h:
3060         * platform/audio/HRTFElevation.cpp:
3061         * platform/cairo/WidgetBackingStore.h:
3062         * platform/graphics/ANGLEWebKitBridge.h:
3063         * platform/graphics/FontPlatformData.h:
3064         * platform/graphics/GraphicsContext3D.cpp:
3065         * platform/graphics/GraphicsContext3D.h:
3066         * platform/graphics/OpenGLESShims.h:
3067         * platform/graphics/OpenGLShims.cpp:
3068         (WebCore::getProcAddress):
3069         * platform/graphics/OpenGLShims.h:
3070         * platform/graphics/PlatformLayer.h:
3071         * platform/graphics/cairo/GLContext.cpp:
3072         (WebCore::GLContext::createContextForWindow):
3073         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
3074         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
3075         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3076         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3077         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
3078         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
3079         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
3080         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
3081         (WebCore::Extensions3DOpenGL::supportsExtension):
3082         * platform/graphics/opengl/Extensions3DOpenGL.h:
3083         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3084         * platform/graphics/opengl/Extensions3DOpenGLES.h:
3085         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3086         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3087         (WebCore::GraphicsContext3D::reshape):
3088         * platform/graphics/texmap/TextureMapper.h:
3089         * plugins/PluginPackage.cpp:
3090         * plugins/PluginView.cpp:
3091         (WebCore::PluginView::PluginView):
3092         * plugins/PluginView.h:
3093         * plugins/PluginViewNone.cpp:
3094
3095 2013-09-08  Darin Adler  <darin@apple.com>
3096
3097         Tighten up EventQueue classes a bit, less indirection and memory allocation
3098         https://bugs.webkit.org/show_bug.cgi?id=121016
3099
3100         Reviewed by Andreas Kling.
3101
3102         * Modules/encryptedmedia/MediaKeySession.cpp:
3103         (WebCore::MediaKeySession::MediaKeySession): Updated since event queue is now
3104         a member rather than an OwnPtr.
3105         (WebCore::MediaKeySession::close): Ditto.
3106         (WebCore::MediaKeySession::keyRequestTimerFired): Ditto.
3107         (WebCore::MediaKeySession::addKeyTimerFired): Ditto.
3108         * Modules/encryptedmedia/MediaKeySession.h: Ditto.
3109
3110         * Modules/indexeddb/IDBDatabase.cpp:
3111         (WebCore::IDBDatabase::closeConnection): Updated since ScriptExecutionContext's
3112         eventQueue function now returns a reference rather than a pointer. Also, the
3113         cancelEvent function takes a reference instead of a pointer.
3114         (WebCore::IDBDatabase::enqueueEvent): Ditto.
3115         * Modules/indexeddb/IDBRequest.cpp:
3116         (WebCore::IDBRequest::abort): Ditto.
3117         (WebCore::IDBRequest::enqueueEvent): Ditto.
3118         * Modules/indexeddb/IDBTransaction.cpp:
3119         (WebCore::IDBTransaction::enqueueEvent): Ditto.
3120
3121         * Modules/mediasource/MediaSource.cpp:
3122         (WebCore::MediaSource::MediaSource): Updated since event queue is now a
3123         member rather than an OwnPtr. Also use initialization instead of assignment
3124         to set up source buffers.
3125         (WebCore::MediaSource::hasPendingActivity): Ditto.
3126         (WebCore::MediaSource::stop): Ditto.
3127         (WebCore::MediaSource::scheduleEvent): Ditto.
3128         * Modules/mediasource/MediaSource.h: Ditto.
3129
3130         * Modules/mediasource/SourceBufferList.cpp:
3131         (WebCore::SourceBufferList::SourceBufferList): Take references instead of
3132         pointers.
3133         (WebCore::SourceBufferList::length): Changed type to unsigned instead of
3134         unsigned long. This is an IDL "unsigned long", which corresponds to "unsigned"
3135         in our C++ DOM implementation.
3136         (WebCore::SourceBufferList::createAndFireEvent): Updated since event queue is
3137         now a reference.
3138         (WebCore::SourceBufferList::scriptExecutionContext): Updated since script
3139         execution context is now a reference.
3140         * Modules/mediasource/SourceBufferList.h: Ditto.
3141
3142         * dom/Document.cpp:
3143         (WebCore::Document::Document): Updated since event queue is now a member rather
3144         than a RefPtr.
3145         (WebCore::Document::detach): Ditto.
3146         (WebCore::Document::enqueueWindowEvent): Ditto.
3147         (WebCore::Document::enqueueDocumentEvent): Ditto.
3148         * dom/Document.h: Ditto.
3149
3150         * dom/DocumentEventQueue.cpp: Renamed DocumentEventQueueTimer to just Timer and
3151         made it a class member of DocumentEventQueue. Also changed it to use references
3152         instead of pointers and removed unneeded ScriptExecutionContext argument.
3153         (WebCore::DocumentEventQueue::DocumentEventQueue): Updated to take a document
3154         reference instead of a script execution context pointer.
3155         (WebCore::DocumentEventQueue::enqueueEvent): Wrote the assertions in a clearer
3156         style and do the assertions even when the queue is closed.
3157         (WebCore::DocumentEventQueue::enqueueOrDispatchScrollEvent): Removed the unneeded
3158         ScrollEventTargetType argument, since the policy is specific to the document node.
3159         Made the argument a reference instead of a PassRefPtr, and rewrote the function
3160         to be more straightforward and readable.
3161         (WebCore::DocumentEventQueue::cancelEvent): Use the return value recently added to
3162         the remove function to avoid the need for use of iterators and a find/remove pair.
3163         (WebCore::DocumentEventQueue::pendingEventTimerFired): Rewrote this to use the
3164         recently added ListHashSet takeFirst function. Also protect the document instead
3165         of protecting just this object during the dispatch. Can't really protect the
3166         event queue since it's no longer separately reference counted.
3167         (WebCore::DocumentEventQueue::dispatchEvent): Changed this to take a reference and
3168         added a FIXME about some curious code in here that needs a "why" comment.
3169         * dom/DocumentEventQueue.h: Removed many unneeded includes, some unneeded forward
3170         declarations, marked the class final, made it no longer derive from RefCounted,
3171         removed ScrollEventTargetType and create, and did the other changes mentioned above.
3172
3173         * dom/EventQueue.h: Got rid of many uneeded includes, changed the argument type
3174         of cancelEvent to Event& and rewrote the comment for close.
3175
3176         * dom/GenericEventQueue.cpp:
3177         (WebCore::GenericEventQueue::GenericEventQueue): Updated to take a reference.
3178         (WebCore::GenericEventQueue::enqueueEvent): Ditto.
3179         (WebCore::GenericEventQueue::timerFired): Ditto.
3180         * dom/GenericEventQueue.h: Changed this class to no longer derive from EventQueue
3181         since there was no value coming from that polymorphism. Removed all the virtual
3182         keywords from the class. Switched from pointers to references. Removed the unused
3183         cancelEvent function. Removed the create function since this is always used as a
3184         data member, not a pointer on the heap.
3185
3186         * dom/ScriptExecutionContext.h: Changed the return type of eventQueue to a reference.
3187
3188         * html/HTMLMediaElement.cpp:
3189         (WebCore::HTMLMediaElement::HTMLMediaElement): Updated since event queue is now a
3190         member rather than an OwnPtr.
3191         (WebCore::HTMLMediaElement::~HTMLMediaElement): Ditto.
3192         (WebCore::HTMLMediaElement::scheduleEvent): Ditto.
3193         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Ditto.
3194         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks): Ditto.
3195         (WebCore::HTMLMediaElement::mediaPlayerKeyAdded): Ditto.
3196         (WebCore::HTMLMediaElement::mediaPlayerKeyError): Ditto.
3197         (WebCore::HTMLMediaElement::mediaPlayerKeyMessage): Ditto.
3198         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): Ditto.
3199         (WebCore::HTMLMediaElement::stop): Ditto.
3200         (WebCore::HTMLMediaElement::hasPendingActivity): Ditto.
3201         * html/HTMLMediaElement.h: Ditto.
3202
3203         * page/EventHandler.cpp:
3204         (WebCore::EventHandler::sendScrollEvent): Updated to remove the now-uneeded
3205         ScrollEventTargetType argument, and also to use references instead of pointers.
3206         * rendering/RenderLayer.cpp:
3207         (WebCore::RenderLayer::scrollTo): Ditto.
3208         * rendering/RenderListBox.cpp:
3209         (WebCore::RenderListBox::scrollTo): Ditto.
3210
3211         * workers/WorkerEventQueue.cpp:
3212         (WebCore::WorkerEventQueue::WorkerEventQueue): Updated to work with references
3213         instead of pointers.
3214         (WebCore::WorkerEventQueue::enqueueEvent): Ditto.
3215         (WebCore::WorkerEventQueue::cancelEvent): Use the take function instead of a
3216         get/remove pair, to eliminate double hashing.
3217         * workers/WorkerEventQueue.h: Removed unneeded includes, forward declarations,
3218         the create function, and the private removeEvent function. Marked class final.
3219
3220         * workers/WorkerGlobalScope.cpp:
3221         (WebCore::WorkerGlobalScope::WorkerGlobalScope): Updated since eventQueue is
3222         now a data member.
3223         (WebCore::WorkerGlobalScope::eventQueue): Ditto.
3224         * workers/WorkerGlobalScope.h: Made m_eventQueue a queue instead of a pointer
3225         to a queue. Also made the eventQueue function private and final.
3226
3227 2013-09-09  Hans Muller  <hmuller@adobe.com>
3228
3229         [CSS Shapes] Heap-buffer-overflow in WebCore::ShapeInterval<float>::subtractShapeIntervals
3230         https://bugs.webkit.org/show_bug.cgi?id=120802
3231
3232         Reviewed by Darin Adler.
3233
3234         Revised the implementation of subtractShapeIntervals() to isloate and check the
3235         places where it dereferences ShapeInterval vector iterators.
3236
3237         Test: fast/shapes/shape-inside/shape-inside-subtract-intervals-crash.html
3238
3239         * rendering/shapes/ShapeInterval.h:
3240         (WebCore::ShapeInterval::subtractShapeIntervals):
3241
3242 2013-09-09  Darin Adler  <darin@apple.com>
3243
3244         matchingShorthandsForLonghand builds map using a giant function
3245         https://bugs.webkit.org/show_bug.cgi?id=121029
3246
3247         Reviewed by Anders Carlsson.
3248
3249         There is no need to use a map for this; a switch statement is fine.
3250         Also, these structures are simple enough that we can build them
3251         every time; we don't need to keep them in globals.
3252
3253         * css/CSSParser.cpp:
3254         (WebCore::CSSParser::addProperty): Got rid of non-helpful local in
3255         CSS_VARIABLES code. Updated for change in return value of the
3256         matchingShorthandsForLonghand.
3257         (WebCore::CSSParser::parseShorthand): Updated for change in return
3258         type of propertiesForInitialization.
3259
3260         * css/CSSProperty.cpp:
3261         (WebCore::StylePropertyMetadata::shorthandID): Updated for change in
3262         return value of matchingShorthandsForLonghand.
3263
3264         * css/StylePropertyShorthand.cpp:
3265         (WebCore::backgroundShorthand): Got rid of local variable, constructing
3266         the StylePropertyShorthand every time.
3267         (WebCore::backgroundPositionShorthand): Ditto.
3268         (WebCore::backgroundRepeatShorthand): Ditto.
3269         (WebCore::borderShorthand): Ditto.
3270         (WebCore::borderAbridgedShorthand): Ditto.
3271         (WebCore::borderBottomShorthand): Ditto.
3272         (WebCore::borderColorShorthand): Ditto.
3273         (WebCore::borderImageShorthand): Ditto.
3274         (WebCore::borderLeftShorthand): Ditto.
3275         (WebCore::borderRadiusShorthand): Ditto.
3276         (WebCore::webkitBorderRadiusShorthand): Ditto.
3277         (WebCore::borderRightShorthand): Ditto.
3278         (WebCore::borderSpacingShorthand): Ditto.
3279         (WebCore::borderStyleShorthand): Ditto.
3280         (WebCore::borderTopShorthand): Ditto.
3281         (WebCore::borderWidthShorthand): Ditto.
3282         (WebCore::listStyleShorthand): Ditto.
3283         (WebCore::fontShorthand): Ditto.
3284         (WebCore::marginShorthand): Ditto. Ditto.
3285         (WebCore::markerShorthand): Ditto.
3286         (WebCore::outlineShorthand): Ditto.
3287         (WebCore::overflowShorthand): Ditto.
3288         (WebCore::paddingShorthand): Ditto.
3289         (WebCore::transitionShorthand): Ditto.
3290         (WebCore::webkitAnimationShorthand): Ditto.
3291         (WebCore::webkitAnimationShorthandForParsing): Ditto.
3292         (WebCore::webkitBorderAfterShorthand): Ditto.
3293         (WebCore::webkitBorderBeforeShorthand): Ditto.
3294         (WebCore::webkitBorderEndShorthand): Ditto.
3295         (WebCore::webkitBorderStartShorthand): Ditto.
3296         (WebCore::webkitColumnsShorthand): Ditto.
3297         (WebCore::webkitColumnRuleShorthand): Ditto.
3298         (WebCore::webkitFlexFlowShorthand): Ditto.
3299         (WebCore::webkitFlexShorthand): Ditto.
3300         (WebCore::webkitMarginCollapseShorthand): Ditto.
3301         (WebCore::webkitGridColumnShorthand): Ditto.
3302         (WebCore::webkitGridRowShorthand): Ditto.
3303         (WebCore::webkitMarqueeShorthand): Ditto.
3304         (WebCore::webkitMaskShorthand): Ditto.
3305         (WebCore::webkitMaskPositionShorthand): Ditto.
3306         (WebCore::webkitMaskRepeatShorthand): Ditto.
3307         (WebCore::webkitTextDecorationShorthand): Ditto.
3308         (WebCore::webkitTextEmphasisShorthand): Ditto.
3309         (WebCore::webkitTextStrokeShorthand): Ditto.
3310         (WebCore::webkitTransitionShorthand): Ditto.
3311         (WebCore::webkitTransformOriginShorthand): Ditto.
3312         (WebCore::widthShorthand): Ditto.
3313         (WebCore::heightShorthand): Ditto.
3314         (WebCore::shorthandForProperty): Ditto.
3315         (WebCore::makeVector): Added. Helper function for the cases in the
3316         switch inside matchingShorthandsForLonghand.
3317         (WebCore::matchingShorthandsForLonghand): Rewrote this to use a switch
3318         instead of a map.
3319         (WebCore::indexOfShorthandForLonghand): Tightened up the coding style a bit.
3320
3321         * css/StylePropertyShorthand.h: Changed type of StylePropertyShorthand's
3322         propertiesForInitialization to be an array of shorthands rather than an
3323         array of pointers to shorthands. Changed return types of the shorthand
3324         functions to return a shorthand object rather than a reference. Did the same
3325         for the other functions.
3326
3327 2013-09-09  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3328
3329         MouseEnter and MouseLeave may be emitted on Document nodes
3330         https://bugs.webkit.org/show_bug.cgi?id=120862
3331
3332         Reviewed by Antonio Gomes.
3333
3334         Replace the overgeneric use of Nodes with Elements in updateHoverActiveState.
3335         This also fixes the bug of emitting mouseenter/mouseleave events on Document,
3336         since Document is not an Element.
3337
3338         This is tested by fast/events/mouseenterleave-on-subframe.html
3339
3340         * dom/Document.cpp:
3341         (WebCore::Document::updateHoverActiveState):
3342
3343 2013-09-09  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3344
3345         MouseLeave not always emitted when cursor leaves subframe
3346         https://bugs.webkit.org/show_bug.cgi?id=121026
3347
3348         Reviewed by Antonio Gomes.
3349
3350         Forward the PlatformMouseEvent in the recursive calls so nested documents
3351         also get a chance to emit mouseleave when the hover moves out.
3352
3353         Test: fast/events/mouseenterleave-on-subframe.html
3354
3355         * dom/Document.cpp:
3356         (WebCore::Document::updateHoverActiveState):
3357
3358 2013-09-09  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3359
3360         Adding username to RTCIceServer
3361         https://bugs.webkit.org/show_bug.cgi?id=120861
3362
3363         Reviewed by Eric Carlson.
3364
3365         No new tests needed. Existing media stream tests already cover it
3366
3367         * Modules/mediastream/RTCPeerConnection.cpp:
3368         (WebCore::RTCPeerConnection::parseConfiguration):
3369         * platform/mediastream/RTCConfiguration.h:
3370         (WebCore::RTCIceServer::create):
3371         (WebCore::RTCIceServer::username):
3372         (WebCore::RTCIceServer::RTCIceServer):
3373
3374 2013-09-09  Antti Koivisto  <antti@apple.com>
3375
3376         Hide Document::renderer()
3377         https://bugs.webkit.org/show_bug.cgi?id=121028
3378
3379         Reviewed by Andreas Kling.
3380
3381         Use less generic Document::renderView() instead.
3382
3383         * accessibility/AXObjectCache.cpp:
3384         (WebCore::AXObjectCache::postNotification):
3385         * accessibility/AccessibilityObject.cpp:
3386         (WebCore::appendAccessibilityObject):
3387         * accessibility/AccessibilityScrollView.cpp:
3388         (WebCore::AccessibilityScrollView::webAreaObject):
3389         * css/CSSFontSelector.cpp:
3390         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
3391         * css/StyleResolver.cpp:
3392         (WebCore::StyleResolver::appendAuthorStyleSheets):
3393         * dom/Document.cpp:
3394         (WebCore::Document::~Document):
3395         (WebCore::Document::webkitGetNamedFlows):
3396         (WebCore::Document::setVisualUpdatesAllowed):
3397         (WebCore::Document::elementFromPoint):
3398         (WebCore::Document::caretRangeFromPoint):
3399         (WebCore::Document::updateLayout):
3400         (WebCore::Document::existingAXObjectCache):
3401         (WebCore::Document::axObjectCache):
3402         (WebCore::Document::setVisuallyOrdered):
3403         (WebCore::Document::implicitClose):
3404         (WebCore::Document::prepareMouseEvent):
3405         (WebCore::Document::styleResolverChanged):
3406         (WebCore::Document::documentWillBecomeInactive):
3407         (WebCore::Document::documentDidResumeFromPageCache):
3408         * dom/Document.h:
3409         * dom/DocumentStyleSheetCollection.cpp:
3410         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
3411         * dom/Element.cpp:
3412         (WebCore::Element::~Element):
3413         * dom/InlineStyleSheetOwner.cpp:
3414         (WebCore::InlineStyleSheetOwner::removedFromDocument):
3415         * dom/ProcessingInstruction.cpp:
3416         (WebCore::ProcessingInstruction::removedFrom):
3417         * editing/FrameSelection.cpp:
3418         (WebCore::FrameSelection::contains):
3419         * html/HTMLElement.cpp:
3420         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
3421         * html/HTMLLinkElement.cpp:
3422         (WebCore::HTMLLinkElement::removedFrom):
3423         * html/HTMLStyleElement.cpp:
3424         (WebCore::HTMLStyleElement::parseAttribute):
3425         (WebCore::HTMLStyleElement::registerWithScopingNode):
3426         (WebCore::HTMLStyleElement::unregisterWithScopingNode):
3427         * html/parser/HTMLResourcePreloader.cpp:
3428         (WebCore::HTMLResourcePreloader::preload):
3429         * loader/ImageLoader.cpp:
3430         (WebCore::ImageLoader::updateFromElement):
3431         * page/EventHandler.cpp:
3432         (WebCore::EventHandler::handleWheelEvent):
3433         (WebCore::EventHandler::handleGestureScrollBegin):
3434         * page/Frame.cpp:
3435         (WebCore::Frame::setPageAndTextZoomFactors):
3436         * page/FrameView.cpp:
3437         (WebCore::FrameView::layout):
3438         (WebCore::FrameView::doLayoutWithFrameFlattening):
3439         * page/Page.cpp:
3440         (WebCore::Page::setPageScaleFactor):
3441         * page/PrintContext.cpp:
3442         (WebCore::PrintContext::spoolAllPagesWithBoundaries):
3443         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3444         (WebCore::MediaPlayerPrivateQTKit::paint):
3445         * style/StyleResolveTree.cpp:
3446         (WebCore::Style::resolveTree):
3447         * svg/SVGDocument.cpp:
3448         (WebCore::SVGDocument::updatePan):
3449
3450 2013-09-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3451
3452         [DOM4] Have ProcessingInstruction inherit CharacterData
3453         https://bugs.webkit.org/show_bug.cgi?id=120691
3454
3455         Reviewed by Darin Adler.
3456
3457         Have ProcessingInstruction inherit CharacterData as per the latest DOM4
3458         specification:
3459         http://dom.spec.whatwg.org/#processinginstruction
3460
3461         Previously, ProcessingInstruction was inheriting from Node as per DOM
3462         Level 3.
3463
3464         Firefox and Blink already follow DOM4 here but not IE10.
3465         This change leads to less code duplication.
3466
3467         Test: fast/dom/processing-instruction-inherit-characterdata.xhtml
3468
3469         * bindings/objc/PublicDOMInterfaces.h:
3470         * dom/CharacterData.cpp:
3471         (WebCore::CharacterData::setDataAndUpdate):
3472         * dom/ProcessingInstruction.cpp:
3473         (WebCore::ProcessingInstruction::ProcessingInstruction):
3474         (WebCore::ProcessingInstruction::cloneNode):
3475         (WebCore::ProcessingInstruction::checkStyleSheet):
3476         (WebCore::ProcessingInstruction::insertedInto):
3477         (WebCore::ProcessingInstruction::removedFrom):
3478         (WebCore::ProcessingInstruction::finishParsingChildren):
3479         * dom/ProcessingInstruction.h:
3480         (WebCore::toProcessingInstruction):
3481         * dom/ProcessingInstruction.idl:
3482
3483 2013-09-09  Krzysztof Czech  <k.czech@samsung.com>
3484
3485         [AX][ATK] AccessibilityObject representing ProgressBar element should be ATK_VALUE type
3486         https://bugs.webkit.org/show_bug.cgi?id=121023
3487
3488         Reviewed by Mario Sanchez Prada.
3489
3490         Test: accessibility/progressbar.html
3491
3492         ProgressBar element should support ATK_VALUE interface.
3493
3494         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3495         (getInterfaceMaskFromObject):
3496
3497 2013-09-09  Claudio Saavedra  <csaavedra@igalia.com>
3498
3499         [GTK]  ghost cursor when mouse hovers over an image file in a tab
3500         https://bugs.webkit.org/show_bug.cgi?id=120675
3501
3502         Reviewed by Carlos Garcia Campos.
3503
3504         No new tests, covered by existing.
3505
3506         * platform/gtk/CursorGtk.cpp:
3507         (WebCore::createNamedCursor): Use new gdk_cursor_new_from_surface()
3508         when compiling against GTK+ 3.9.12 or newer.
3509
3510 2013-09-08  Santosh Mahto  <santosh.ma@samsung.com>
3511
3512         HTMLDocument.h : Removing unnecessary forward declaration.
3513         https://bugs.webkit.org/show_bug.cgi?id=121002
3514
3515         Reviewed by Darin Adler.
3516
3517         Just code cleanup.
3518         Removed the two forward declaration in HTMLDocument.h file.
3519
3520         * html/HTMLDocument.h:
3521
3522 2013-09-08  Gurpreet Kaur  <k.gurpreet@samsung.com>
3523
3524         defining line height affects height of text box
3525         https://bugs.webkit.org/show_bug.cgi?id=17619
3526
3527         Reviewed by Darin Adler.
3528
3529         Giving line height to input elements increase the height
3530         of the element. To make it work similiar as Mozilla and IE
3531         line-height :normal should be applied for input elements.
3532
3533         Test: fast/dom/HTMLInputElement/input-line-height.html
3534
3535         * css/html.css:
3536         (input):
3537         Made the line-height: normal as !important so that it does not
3538         consider any other line-height specified through internal or 
3539         external styles.
3540
3541 2013-09-08  Gurpreet Kaur  <k.gurpreet@samsung.com>
3542
3543         Scrollbar width is not applied when element hidden
3544         https://bugs.webkit.org/show_bug.cgi?id=90546
3545
3546         Reviewed by Simon Fraser.
3547
3548         Webkit has css properties through which custom scroll
3549         bars can be added. Incase the element's visible property
3550         is hidden and custom scrollbar properties are applied
3551         the scrollbar width is not considered when quering the 
3552         element.clientWidth. Incase of non-custom scrollbars 
3553         whether the element's visible property is hidden or not
3554         correct scrollbar width is considered.
3555
3556         Tests: fast/dom/Element/scroll-width-hidden.html
3557                fast/dom/Element/scroll-width-visible.html
3558
3559         * rendering/RenderScrollbar.cpp:
3560         (WebCore::RenderScrollbar::updateScrollbarPart):
3561         Incase custom scrollbar is created there is a check whether
3562         the renderer to which scrollbar is added is visible or not.
3563         This check is not required since for non-custom scrollbars same
3564         check is not present. Also whether element's visible property is
3565         hidden or not a placeholder is set for the element. Both behavoiur
3566         i.e custom and non-custom scrollbars should be same.
3567
3568 2013-09-08  Tamas Czene  <tczene@inf.u-szeged.hu>
3569
3570         GStreamer 0.10 build fix after r155251.
3571
3572         Reviewed by Csaba Osztrogon√°c.
3573
3574         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
3575
3576 2013-09-08  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3577
3578         [wk2] REGRESSION (r154673): PDF scrolling moves very slowly
3579         https://bugs.webkit.org/show_bug.cgi?id=120542
3580
3581         Reviewed by Tim Horton.
3582
3583         Handle 'wheel' events in addition to 'mousewheel'.
3584
3585         * html/shadow/MediaControlsApple.cpp:
3586         Listen for the standard 'wheel' event instead of the legacy 'mousewheel' one.
3587         While not strictly needed, we should use the legacy events as little as
3588         possible.
3589         * plugins/PluginView.cpp:
3590         Handle 'wheel' events in addition to 'mousewheel'.
3591
3592 2013-09-08  Darin Adler  <darin@apple.com>
3593
3594         Make Editor::deleteButtonController a reference
3595         https://bugs.webkit.org/show_bug.cgi?id=121019
3596
3597         Reviewed by Andreas Kling.
3598
3599         * dom/ContainerNode.cpp:
3600         (WebCore::ContainerNode::cloneChildNodes): Updated to use . instead of ->.
3601         * editing/DeleteButton.cpp:
3602         (WebCore::DeleteButton::defaultEventHandler): Ditto.
3603
3604         * editing/DeleteButtonController.cpp:
3605         (WebCore::DeleteButtonController::DeleteButtonController): Updated to take a Frame&
3606         instead of a Frame*.
3607         (WebCore::DeleteButtonController::respondToChangedSelection): Ditto.
3608         (WebCore::DeleteButtonController::createDeletionUI): Ditto.
3609         (WebCore::DeleteButtonController::show): Ditto.
3610         (WebCore::DeleteButtonController::enable): Ditto.
3611         (WebCore::DeleteButtonController::deleteTarget): Ditto.
3612         * editing/DeleteButtonController.h: Ditto.
3613
3614         * editing/Editor.cpp:
3615         (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Removed bogus
3616         null check from both versions of this function.
3617         (WebCore::Editor::Editor): Use construction rather than assignment and pass
3618         a reference instead of a pointer to make m_deleteButtonController.
3619         (WebCore::Editor::clear): Ditto.
3620
3621         * editing/Editor.h: Made deleteButtonController return a reference.
3622         Also reorganized the header to put all the conditional functions together,
3623         and not mixed in with non-conditional ones.
3624
3625         * editing/markup.cpp:
3626         (WebCore::createMarkup): Updated to use . instead of -> and also to use
3627         emptyString() instead of constructing a new empty string.
3628
3629 2013-09-08  Andreas Kling  <akling@apple.com>
3630
3631         InlineBox::root() should return a reference.
3632         <https://webkit.org/b/121014>
3633
3634         Reviewed by Antti Koivisto.
3635
3636         There is always a root inline box, so make root() return a reference.
3637         Also make some effort to cache the result in a local at call sites.
3638
3639 2013-09-08  Andreas Kling  <akling@apple.com>
3640
3641         FrameView::scheduleEvent() is over-engineered.
3642         <https://webkit.org/b/121004>
3643
3644         Reviewed by Antti Koivisto.
3645
3646         Remove gratuitous FrameActionScheduler class that was really only being used
3647         to defer the occassional "overflowchanged" event until layout had finished.
3648
3649         * CMakeLists.txt:
3650         * GNUmakefile.list.am:
3651         * Target.pri:
3652         * WebCore.vcxproj/WebCore.vcxproj:
3653         * WebCore.vcxproj/WebCore.vcxproj.filters:
3654         * WebCore.xcodeproj/project.pbxproj:
3655         * page/FrameActionScheduler.cpp:
3656         * page/FrameActionScheduler.h:
3657
3658             Removed FrameActionScheduler.
3659
3660         * page/FrameView.h:
3661         * page/FrameView.cpp:
3662         (WebCore::FrameView::FrameView):
3663         (WebCore::FrameView::~FrameView):
3664         (WebCore::FrameView::layout):
3665         (WebCore::FrameView::ScheduledEvent::ScheduledEvent):
3666         (WebCore::FrameView::scheduleEvent):
3667         (WebCore::FrameView::pauseScheduledEvents):
3668         (WebCore::FrameView::resumeScheduledEvents):
3669         (WebCore::FrameView::performPostLayoutTasks):
3670         (WebCore::FrameView::updateOverflowStatus):
3671
3672             Replaced it with a Vector<ScheduledEvent> and a suppression counter.
3673             A ScheduledEvent is just a { Node, Event } pair.
3674
3675 2013-09-08  Anders Carlsson  <andersca@apple.com>
3676
3677         Move WTF::notFound to Vector.h and delete NotFound.h
3678         https://bugs.webkit.org/show_bug.cgi?id=120990
3679
3680         Reviewed by Sam Weinig.
3681
3682         * html/HTMLImageElement.cpp:
3683         * loader/archive/mhtml/MHTMLParser.cpp:
3684         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3685         * platform/graphics/win/GraphicsContext3DWin.cpp:
3686         * platform/network/soup/SocketStreamHandleSoup.cpp:
3687
3688 2013-09-08  Commit Queue  <commit-queue@webkit.org>
3689
3690         Unreviewed, rolling out r155069 and r155138.
3691         http://trac.webkit.org/changeset/155069
3692         http://trac.webkit.org/changeset/155138
3693         https://bugs.webkit.org/show_bug.cgi?id=121008
3694
3695         Seems to have broken many tests (bug 120963) (Requested by ap
3696         on #webkit).
3697
3698         * WebCore.xcodeproj/project.pbxproj:
3699         * platform/graphics/cg/PDFDocumentImage.cpp:
3700         (WebCore::PDFDocumentImage::PDFDocumentImage):
3701         (WebCore::PDFDocumentImage::~PDFDocumentImage):
3702         (WebCore::PDFDocumentImage::size):
3703         (WebCore::PDFDocumentImage::dataChanged):
3704         (WebCore::PDFDocumentImage::adjustCTM):
3705         (WebCore::PDFDocumentImage::setCurrentPage):
3706         (WebCore::PDFDocumentImage::pageCount):
3707         (WebCore::PDFDocumentImage::draw):
3708         * platform/graphics/cg/PDFDocumentImage.h:
3709         (WebCore::PDFDocumentImage::create):
3710         (WebCore::PDFDocumentImage::hasSingleSecurityOrigin):
3711         (WebCore::PDFDocumentImage::destroyDecodedData):
3712         (WebCore::PDFDocumentImage::decodedSize):
3713         * platform/graphics/mac/PDFDocumentImageMac.mm: Removed.
3714         * platform/mac/SoftLinking.h:
3715
3716 2013-09-08  Andreas Kling  <akling@apple.com>
3717
3718         ScriptExecutionContext: Use FINAL instead of foo() { virtualFoo() }
3719         <https://webkit.org/b/120827>
3720
3721         Reviewed by Darin Adler.
3722
3723         Now that we have FINAL, we can just use that to have fast versions of url()
3724         and completeURL() when calling through a Document or WorkerGlobalScope pointer.
3725
3726         * dom/Document.cpp:
3727         * dom/Document.h:
3728         * dom/ScriptExecutionContext.h:
3729         * workers/WorkerGlobalScope.cpp:
3730         * workers/WorkerGlobalScope.h:
3731
3732 2013-09-08  Antti Koivisto  <antti@apple.com>
3733
3734         Rename needsShadowTreeWalker
3735         https://bugs.webkit.org/show_bug.cgi?id=121005
3736
3737         Reviewed by Andreas Kling.
3738
3739         Rename to needsNodeRenderingTraversalSlowPath.
3740
3741         * dom/ContainerNode.h:
3742         (WebCore::Node::needsNodeRenderingTraversalSlowPath):
3743         * dom/Element.cpp:
3744         (WebCore::shouldUseNodeRenderingTraversalSlowPath):
3745         (WebCore::Element::resetNeedsNodeRenderingTraversalSlowPath):
3746
3747             Only Elements can have this flag. Move the code here from Node.
3748
3749         (WebCore::Element::addShadowRoot):
3750         (WebCore::Element::setBeforePseudoElement):
3751         (WebCore::Element::setAfterPseudoElement):
3752         (WebCore::Element::clearBeforePseudoElement):
3753         (WebCore::Element::clearAfterPseudoElement):
3754
3755             Reset after clear too.
3756
3757         * dom/Element.h:
3758         * dom/Element.h:
3759         * dom/Node.cpp:
3760         * dom/Node.h:
3761         (WebCore::Node::isInsertionPoint):
3762         (WebCore::Node::setNeedsNodeRenderingTraversalSlowPath):
3763         
3764             Make protected.
3765
3766         * dom/NodeRenderingTraversal.h:
3767         (WebCore::NodeRenderingTraversal::parent):
3768         (WebCore::NodeRenderingTraversal::nextSibling):
3769         (WebCore::NodeRenderingTraversal::previousSibling):
3770
3771 2013-09-08  Andreas Kling  <akling@apple.com>
3772
3773         Render{Block,Inline}::lineBoxes() should return a reference.
3774         <https://webkit.org/b/120995>
3775
3776         Reviewed by Antti Koivisto.
3777
3778         This function was already just returning the address of a member variable.
3779
3780 2013-09-08  Andreas Kling  <akling@apple.com>
3781
3782         Move "using software CSS filters" optimization flag to RenderView.
3783         <https://webkit.org/b/120999>
3784
3785         Reviewed by Antti Koivisto.
3786
3787         This flag is used to avoid an extra tree walk when there are no software CSS filters in use.
3788         Move it from FrameView to RenderView where it belongs.
3789
3790         * page/FrameView.h:
3791         * rendering/RenderLayer.cpp:
3792         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
3793         * rendering/RenderObject.cpp:
3794         (WebCore::RenderObject::containerForRepaint):
3795         * rendering/RenderView.cpp:
3796         (WebCore::RenderView::RenderView):
3797         * rendering/RenderView.h:
3798
3799 2013-09-08  Andreas Kling  <akling@apple.com>
3800
3801         FrameLoader::icon() should return a reference.
3802         <https://webkit.org/b/120993>
3803
3804         Reviewed by Antti Koivisto.
3805
3806         This function never returns null. Make it return a reference!
3807
3808 2013-09-08  Andreas Kling  <akling@apple.com>
3809
3810         Remove unused Scrollbar tickmark stuff.
3811         <https://webkit.org/b/121000>
3812
3813         Reviewed by Antti Koivisto.
3814
3815         This code is no longer used by any ports.
3816
3817         * page/FrameView.cpp:
3818         * page/FrameView.h:
3819         * platform/ScrollableArea.h:
3820         * platform/Scrollbar.cpp:
3821         * platform/Scrollbar.h:
3822         * platform/ScrollbarThemeClient.h:
3823
3824 2013-09-08  Antti Koivisto  <antti@apple.com>
3825
3826         Remove ComposedShadowTreeWalker
3827         https://bugs.webkit.org/show_bug.cgi?id=120997
3828
3829         Reviewed by Andreas Kling.
3830
3831         Move the code to NodeRenderingTraversal which is the only client besides Internals.
3832
3833         * CMakeLists.txt:
3834         * GNUmakefile.list.am:
3835         * Target.pri:
3836         * WebCore.exp.in:
3837         * WebCore.vcxproj/WebCore.vcxproj:
3838         * WebCore.xcodeproj/project.pbxproj:
3839         * dom/ComposedShadowTreeWalker.cpp: Removed.
3840         * dom/ComposedShadowTreeWalker.h: Removed.
3841         * dom/NodeRenderingTraversal.cpp:
3842         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed):
3843         (WebCore::NodeRenderingTraversal::findFirstSiblingEnteringInsertionPoints):
3844         (WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints):
3845         (WebCore::NodeRenderingTraversal::findFirstFromDistributedNode):
3846         (WebCore::NodeRenderingTraversal::findLastSiblingEnteringInsertionPoints):
3847         (WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints):
3848         (WebCore::NodeRenderingTraversal::findLastFromDistributedNode):
3849         (WebCore::NodeRenderingTraversal::traverseParent):
3850         (WebCore::NodeRenderingTraversal::traverseFirstChild):
3851         (WebCore::NodeRenderingTraversal::traverseLastChild):
3852         (WebCore::NodeRenderingTraversal::traverseNextSibling):
3853         (WebCore::NodeRenderingTraversal::traversePreviousSibling):
3854         
3855             Make former members of ComposedShadowTreeWalker standalone functions in NodeRenderingTraversal.
3856
3857         (WebCore::NodeRenderingTraversal::parentSlow):
3858         (WebCore::NodeRenderingTraversal::nextSiblingSlow):
3859         (WebCore::NodeRenderingTraversal::previousSiblingSlow):
3860         (WebCore::NodeRenderingTraversal::nextInScope):
3861         (WebCore::NodeRenderingTraversal::previousInScope):
3862         (WebCore::NodeRenderingTraversal::parentInScope):
3863         (WebCore::NodeRenderingTraversal::lastChildInScope):
3864         * testing/Internals.cpp:
3865         * testing/Internals.h:
3866         * testing/Internals.idl:
3867
3868 2013-09-08  Andreas Kling  <akling@apple.com>
3869
3870         FrameLoader::policyChecker() should return a reference.
3871         <https://webkit.org/b/120991>
3872
3873         Reviewed by Antti Koivisto.
3874
3875         This function never returns null. Make it return a reference!
3876
3877 2013-09-08  Andreas Kling  <akling@apple.com>
3878
3879         FrameLoader::mixedContentChecker() should return a reference.
3880         <https://webkit.org/b/120992>
3881
3882         Reviewed by Antti Koivisto.
3883
3884         This function was already just returning the address of a member variable.
3885
3886 2013-09-07  Antti Koivisto  <antti@apple.com>
3887
3888         Separate forward and backward paths in ComposedShadowTreeWalker
3889         https://bugs.webkit.org/show_bug.cgi?id=120979
3890
3891         Reviewed by Andreas Kling.
3892
3893         Have separate first/last and next/previous paths instead of using a direction enum.
3894         
3895         Reduce the number of helper functions and give them more understandable names.
3896
3897         * dom/ComposedShadowTreeWalker.cpp:
3898         (WebCore::findFirstSiblingEnteringInsertionPoints):
3899         (WebCore::findFirstEnteringInsertionPoints):
3900         (WebCore::findFirstFromDistributedNode):
3901         (WebCore::findLastSiblingEnteringInsertionPoints):
3902         (WebCore::findLastEnteringInsertionPoints):
3903         (WebCore::findLastFromDistributedNode):
3904         (WebCore::ComposedShadowTreeWalker::firstChild):
3905         (WebCore::ComposedShadowTreeWalker::traverseFirstChild):
3906         (WebCore::ComposedShadowTreeWalker::lastChild):
3907         (WebCore::ComposedShadowTreeWalker::traverseLastChild):
3908         (WebCore::ComposedShadowTreeWalker::nextSibling):
3909         (WebCore::ComposedShadowTreeWalker::previousSibling):
3910         (WebCore::ComposedShadowTreeWalker::traverseNextSibling):
3911         (WebCore::ComposedShadowTreeWalker::traversePreviousSibling):
3912         * dom/ComposedShadowTreeWalker.h:
3913
3914 2013-09-07  Andreas Kling  <akling@apple.com>
3915
3916         Beat FrameView with the FINAL stick.
3917         <https://webkit.org/b/120989>
3918
3919         Reviewed by Anders Carlsson.
3920
3921         ... and mark everything virtual with OVERRIDE, exposing a couple of things
3922         that didn't actually override anything.
3923
3924         * WebCore.exp.in:
3925         * page/FrameView.h:
3926
3927 2013-09-07  Anders Carlsson  <andersca@apple.com>
3928
3929         Remove NonCopyableSort.h from WTF
3930         https://bugs.webkit.org/show_bug.cgi?id=120984
3931
3932         Reviewed by Andreas Kling.
3933
3934         * css/MediaQuery.cpp:
3935         (WebCore::MediaQuery::MediaQuery):
3936         * html/HTMLMediaElement.cpp:
3937         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
3938         * html/RangeInputType.cpp:
3939         (WebCore::RangeInputType::updateTickMarkValues):
3940         * inspector/InspectorMemoryAgent.cpp:
3941         * page/CaptionUserPreferences.cpp:
3942         (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
3943         * page/CaptionUserPreferences.h:
3944         * page/CaptionUserPreferencesMediaAF.cpp:
3945         (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu):
3946         * platform/graphics/texmap/TextureMapper.cpp:
3947         (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
3948
3949 2013-09-07  Antti Koivisto  <antti@apple.com>
3950
3951         Simplify ComposedShadowTreeWalker parent traversal
3952         https://bugs.webkit.org/show_bug.cgi?id=120971
3953
3954         Reviewed by Andreas Kling.
3955
3956         Combine a bunch of parent traversal functions into one.
3957
3958         * dom/ComposedShadowTreeWalker.cpp:
3959         (WebCore::ComposedShadowTreeWalker::traverseParent):
3960         (WebCore::ComposedShadowTreeWalker::previous):
3961         * dom/ComposedShadowTreeWalker.h:
3962         
3963             Remove unused fromFirstChild.
3964
3965 2013-09-07  Anders Carlsson  <andersca@apple.com>
3966
3967         Get rid of PassOwnArrayPtr
3968         https://bugs.webkit.org/show_bug.cgi?id=120964
3969
3970         Reviewed by Andreas Kling.
3971
3972         Use OwnArrayPtr instead of PassOwnArrayPtr.
3973
3974         * html/canvas/WebGLRenderingContext.cpp:
3975         * platform/Length.cpp:
3976         (WebCore::newCoordsArray):
3977         (WebCore::newLengthArray):
3978         * platform/Length.h:
3979         * platform/audio/FFTFrame.h:
3980         * platform/graphics/GraphicsContext3D.cpp:
3981         * platform/graphics/GraphicsContext3D.h:
3982         * platform/graphics/texmap/TextureMapperGL.cpp:
3983         * platform/graphics/wince/SharedBitmap.cpp:
3984
3985 2013-09-07  Antti Koivisto  <antti@apple.com>
3986
3987         Remove unnecessary sibling text renderers after attach
3988         https://bugs.webkit.org/show_bug.cgi?id=120953
3989
3990         Reviewed by the Swedish Review Team: Anders Carlsson and Andreas Kling.
3991
3992         The current createTextRenderersForSiblingsAfterAttachIfNeeded code only adds text renderers, never removes them. 
3993         Style changes can go either way.
3994         
3995         The patch causes no visible changes in rendered output. The whitespace nodes that it affects are leftovers that
3996         have no rendering effect. However it does change results of many dumpAsText and render tree dump based layout
3997         tests as unnecessary text nodes disappear.
3998         
3999         The main goal is to make results of dynamic attach and parsing time attach produce more similar results. As
4000         an added bonus we get slightly simpler rendering trees.
4001         
4002         Rendering tree dumps show us still leaving behind empty anonymous blocks when removing whitespace text nodes.
4003         Those should collapse away too.
4004
4005         * style/StyleResolveTree.cpp:
4006         (WebCore::Style::reattachTextRenderersForWhitespaceOnlySiblingsAfterAttachIfNeeded):
4007         
4008             Allow the code both create and remove text renderers.
4009             Tighten to bail out faster if case is not the exact one that matters.
4010             Use NodeRenderingTraversal to mirror textRendererIsNeeded.
4011             Renamed for clarity.
4012
4013         (WebCore::Style::updateTextRendererAfterContentChange):
4014         (WebCore::Style::resolveLocal):
4015         (WebCore::Style::updateTextStyle):
4016         (WebCore::Style::attachRenderTree):
4017
4018 2013-09-07  Anders Carlsson  <andersca@apple.com>
4019
4020         Get rid of FastAllocBase.h
4021         https://bugs.webkit.org/show_bug.cgi?id=120952
4022
4023         Reviewed by Antti Koivisto.
4024
4025         Include FastMalloc.h instead of FastAllocBase.h.
4026
4027         * Modules/webdatabase/SQLTransactionClient.h:
4028         * bindings/js/GCController.h:
4029         * bridge/Bridge.h:
4030         * bridge/IdentifierRep.h:
4031         * dom/DocumentStyleSheetCollection.h:
4032         * dom/TransformSource.h:
4033         * html/InputType.h:
4034         * inspector/InspectorCounters.h:
4035         * inspector/InstrumentingAgents.h:
4036         * inspector/WorkerInspectorController.h:
4037         * loader/cache/CachedResourceClient.h:
4038         * page/FrameActionScheduler.h:
4039         * platform/Length.h:
4040         * platform/MemoryPressureHandler.h:
4041