ff5daf1dc0616f01b5f228255b212d3092918fa0
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-09-15  Andreas Kling  <akling@apple.com>
2
3         Restore two-pass mechanism for FrameView::updateEmbeddedObjects().
4         <https://webkit.org/b/121380>
5
6         Reviewed by Darin Adler.
7
8         Restore the code to make a second pass over the embedded objects needing
9         an update in case more objects were added to the set during the first pass.
10
11 2013-09-15  Frédéric Wang  <fred.wang@free.fr>
12
13         Implement the mmultiscripts tag
14         https://bugs.webkit.org/show_bug.cgi?id=99618
15
16         Reviewed by Chris Fleizach.
17
18         Tests: mathml/invalid-scripts-crash.html
19                mathml/presentation/multiscripts-equivalence.html
20                mathml/presentation/multiscripts-noscripts.html
21                mathml/presentation/multiscripts-positions.html
22                mathml/presentation/scripts-base-alignment.html
23                mathml/presentation/scripts-horizontal-alignment.html
24                mathml/presentation/scripts-vertical-alignment.html
25                mathml/scripts-addChild.html
26                mathml/scripts-removeChild.html
27
28         This relies on the existing msub/msup/msubsup code to implement the mmultiscripts tag. This also improves dynamic addition/removal of children for these MathML elements and adds a specific style for invalid children, so that they render like an merror tag. Finally, this fixes a bad memory access in the Accessibility render object of msubsup.
29
30         * CMakeLists.txt:
31         * GNUmakefile.list.am:
32         * Target.pri:
33         * WebCore.vcxproj/WebCore.vcxproj:
34         * WebCore.vcxproj/WebCore.vcxproj.filters:
35         * WebCore.xcodeproj/project.pbxproj:
36         * accessibility/AccessibilityRenderObject.cpp:
37         (WebCore::AccessibilityRenderObject::isMathSubscriptSuperscript):
38         (WebCore::AccessibilityRenderObject::mathSuperscriptObject):
39         * css/mathml.css:
40         (mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot):
41         (mover > :last-child, munderover > :last-child):
42         (msub > * + *, msup > * + *, msubsup > * + *, mmultiscripts > * + *, munder > * + *, mover > * + *, munderover > * + *):
43         (merror, msub > * + * + *, msup > * + * + *, msubsup > * + * + * + *, msub > mprescripts, msup > mprescripts, msubsup > mprescripts, msub > none, msup > none, msubsup > none, mmultiscripts > mprescripts ~ mprescripts, mmultiscripts > mprescripts ~ mprescripts ~ *):
44         * mathml/MathMLInlineContainerElement.cpp:
45         (WebCore::MathMLInlineContainerElement::createRenderer):
46         * mathml/mathtags.in:
47         * rendering/mathml/RenderMathMLBlock.h:
48         (WebCore::RenderMathMLBlock::isRenderMathMLScripts):
49         (WebCore::RenderMathMLBlock::isRenderMathMLScriptsWrapper):
50         * rendering/mathml/RenderMathMLScripts.cpp: Added.
51         (WebCore::isMPrescripts):
52         (WebCore::RenderMathMLScripts::RenderMathMLScripts):
53         (WebCore::RenderMathMLScripts::base):
54         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
55         (WebCore::RenderMathMLScripts::fixAnonymousStyles):
56         (WebCore::RenderMathMLScripts::addChildInternal):
57         (WebCore::RenderMathMLScripts::removeChildInternal):
58         (WebCore::RenderMathMLScripts::addChild):
59         (WebCore::RenderMathMLScripts::removeChild):
60         (WebCore::RenderMathMLScripts::styleDidChange):
61         (WebCore::RenderMathMLScripts::unembellishedOperator):
62         (WebCore::RenderMathMLScripts::layout):
63         (WebCore::RenderMathMLScripts::firstLineBoxBaseline):
64         (WebCore::RenderMathMLScriptsWrapper::createAnonymousWrapper):
65         (WebCore::RenderMathMLScriptsWrapper::addChildInternal):
66         (WebCore::RenderMathMLScriptsWrapper::addChild):
67         (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
68         (WebCore::RenderMathMLScriptsWrapper::removeChild):
69         * rendering/mathml/RenderMathMLScripts.h: Added.
70         (WebCore::RenderMathMLScriptsWrapper::RenderMathMLScriptsWrapper):
71         (WebCore::RenderMathMLScriptsWrapper::renderName):
72         (WebCore::RenderMathMLScriptsWrapper::isRenderMathMLScriptsWrapper):
73         (WebCore::toRenderMathMLScriptsWrapper):
74         (WebCore::RenderMathMLScripts::isRenderMathMLScripts):
75         (WebCore::RenderMathMLScripts::renderName):
76         (WebCore::toRenderMathMLScripts):
77         * rendering/mathml/RenderMathMLSubSup.cpp: Removed.
78         * rendering/mathml/RenderMathMLSubSup.h: Removed.
79
80 2013-09-15  Andreas Kling  <akling@apple.com>
81
82         Get rid of ref-counting on RenderWidget.
83         <https://webkit.org/b/121357>
84
85         Reviewed by Darin Adler.
86
87         Instead of RenderView tracking RenderWidgets, have FrameView track Widgets
88         that are currently in the render tree.
89
90         To protect ourselves during NPAPI tomfoolery, we now let RenderWidget hand
91         out weak pointers through a createWeakPtr() method so call sites can monitor
92         the renderer for deletion without having to take shared ownership.
93
94         This works out quite nicely since instead of keeping a limping object alive
95         for a little longer just so we can call methods on it (to accomplish nothing),
96         we're forced to check right away if it's gone, and take immediate action.
97
98         De-virtualized RenderObject::destroy() since it's no longer needed for
99         RenderWidget to defer destruction.
100
101         * page/FrameView.cpp:
102         (WebCore::FrameView::layout):
103         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
104
105             Call updateWidgetPositions() on FrameView instead of RenderView.
106
107         (WebCore::FrameView::updateEmbeddedObject):
108
109             Turn null checking of embedded object's element backpointer into an
110             assertion. This will eventually go away completely once that renderer
111             can return a HTMLFrameOwnerElement&.
112
113             Use WeakPtr to check for renderer destruction following the call out
114             to updateWidget().
115
116         (WebCore::FrameView::updateEmbeddedObjects):
117
118             Slap a WidgetHierarchyUpdatesSuspensionScope guard on this function
119             to defer Widget updates until all the updateEmbeddedObject calls are
120             done. This avoids RenderWidget::setWidget() having to handle 'this'
121             disappearing from underneath.
122
123             Also use a ListHashSet with a null sentinel to avoid looping forever.
124
125         (WebCore::FrameView::performPostLayoutTasks):
126
127             Only call updateEmbeddedObjects() once since that function no longer
128             operates in chunks.
129
130         (WebCore::FrameView::notifyWidgetsInAllFrames):
131
132             Call notifyWidgets() on FrameView instead of RenderView.
133
134         (WebCore::FrameView::didAddWidgetToRenderTree):
135         (WebCore::FrameView::willRemoveWidgetFromRenderTree):
136
137             Added. These are called by RenderWidget when a Widget is being
138             added or removed from a RenderWidget.
139
140         (WebCore::collectWidgets):
141
142             Helper to collect raw Widget pointers into a Vector and ref them.
143
144         (WebCore::FrameView::updateWidgetPositions):
145
146             Moved here from RenderView. This function holds a ref on all the
147             attached Widgets and calls RenderWidget::updateWidgetPosition() on
148             their corresponding renderers.
149
150         (WebCore::FrameView::notifyWidgets):
151
152             Moved here from RenderView. Holds a ref on all the widgets while
153             calling Widget::notifyWidget() on each one.
154
155         * rendering/RenderLayer.cpp:
156         (WebCore::RenderLayer::scrollTo):
157
158             Call updateWidgetPositions() on FrameView instead of RenderView.
159
160         * rendering/RenderObject.h:
161
162             De-virtualized destroy().
163
164         * rendering/RenderView.cpp:
165         * rendering/RenderView.h:
166
167             Moved a bunch of things to FrameView. Made protected section private
168             since nothing inherits from RenderView.
169
170         * rendering/RenderWidget.h:
171         (WebCore::RenderWidget::createWeakPtr):
172
173             Added a WeakPtr factory for clients that want to monitor this object
174             for destruction.
175             
176         * rendering/RenderWidget.cpp:
177         (WebCore::RenderWidget::RenderWidget):
178         (WebCore::RenderWidget::willBeDestroyed):
179         (WebCore::RenderWidget::~RenderWidget):
180
181             Removed ref counting.
182             Removed registration with RenderView in ctor/willBeDestroyed.
183
184         (WebCore::RenderWidget::setWidgetGeometry):
185
186             Monitor the RenderWidget itself through a WeakPtr and check on it
187             after each step that we're still alive. In that case just bail out.
188
189         (WebCore::RenderWidget::setWidget):
190
191             Register the incoming/outgoing Widget with the FrameView.
192             Use a WeakPtr to check on 'this' after updateWidgetGeometry().
193
194         (WebCore::RenderWidget::updateWidgetPosition):
195
196             Use a WeakPtr to check on 'this' after updateWidgetGeometry().
197
198         * GNUmakefile.list.am:
199         * rendering/RenderWidgetProtector.h:
200
201             Removed.
202
203
204 2013-09-14  Sam Weinig  <sam@webkit.org>
205
206         [CTTE] Node subclasses should take a Document by reference in their constructor (Part 5)
207         https://bugs.webkit.org/show_bug.cgi?id=121375
208
209         Reviewed by Andreas Kling.
210
211         * dom/make_names.pl:
212         Add support for a top level 'constructorTakesDocumentReference' property to
213         force using a Document reference for the whole factory.
214
215         * html/HTMLTagNames.in:
216         Replace per-tag 'constructorTakesDocumentReference' with a top level declaration
217         now that all of the HTML tag names are supported.
218
219         Converts the following to take a Document reference:
220             - HTMLContentElement
221             - HTMLElement
222             - HTMLFrameElementBase
223             - HTMLFrameOwnerElement
224             - HTMLPlugInElement
225             - HTMLPlugInImageElement
226             - HTMLUnknownElement
227             - InsertionPoint
228             - StyledElement
229             - TextTrackCueBox
230             - TextTrackCueGenericBoxElement
231
232 2013-09-14  Eric Carlson  <eric.carlson@apple.com>
233
234         MediaStream API: Update RTCDataChannel
235         https://bugs.webkit.org/show_bug.cgi?id=121102
236
237         Reviewed by Sam Weinig.
238
239         Based on https://chromium.googlesource.com/chromium/blink/+/c6975c41956acded7cf0363012d7d6b69d0c6d96,
240         and https://chromium.googlesource.com/chromium/blink/+/214dab0bd6385f573c918ba5ce58a5aa206ce186.
241
242         No new tests, existing tests updated.
243
244         * Modules/mediastream/RTCDataChannel.cpp:
245         (WebCore::RTCDataChannel::create): Take an options Dictionary.
246         (WebCore::RTCDataChannel::didChangeReadyState): String -> AtomicString. Early return if the
247             state hasn't changed.
248         (WebCore::RTCDataChannel::binaryType): String -> AtomicString.
249         (WebCore::RTCDataChannel::setBinaryType): String -> AtomicString.
250         * Modules/mediastream/RTCDataChannel.h:
251         * Modules/mediastream/RTCDataChannel.idl:
252
253         * Modules/mediastream/RTCPeerConnection.cpp:
254         (WebCore::RTCPeerConnection::createDataChannel): Take an options struct.
255         * platform/mediastream/RTCDataChannelHandler.h:
256
257         * platform/mediastream/RTCPeerConnectionHandler.h:
258         (WebCore::RTCDataChannelInit::RTCDataChannelInit): Take an options struct.
259
260 2013-09-14  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
261
262         MediaStream API: Update RTCDataChannel to match the specification
263         https://bugs.webkit.org/show_bug.cgi?id=120889
264
265         Reviewed by Eric Carlson
266
267         Merged from https://chromium.googlesource.com/chromium/blink/+/c3862b0a83e20fc8b1f770c7e4a886a7cceb80d2
268         by Tommy Widenflycht.
269
270         According to WebRTC specification, RTCDataChannel must have the following new attributes:
271         boolean ordered
272         unsigned short maxRetransmitTime
273         unsigned short maxRetransmits
274         DOMString protocol
275         boolean negotiated
276         unsigned short id
277
278         and the following one was deprecated:
279         boolean reliable
280
281         Test updates will be landed with https://webkit.org/b/121102.
282
283         * Modules/mediastream/RTCDataChannel.cpp:
284         (WebCore::RTCDataChannel::ordered):
285         (WebCore::RTCDataChannel::maxRetransmitTime):
286         (WebCore::RTCDataChannel::maxRetransmits):
287         (WebCore::RTCDataChannel::protocol):
288         (WebCore::RTCDataChannel::negotiated):
289         (WebCore::RTCDataChannel::id):
290         * Modules/mediastream/RTCDataChannel.h:
291         * Modules/mediastream/RTCDataChannel.idl:
292         * platform/mediastream/RTCDataChannelHandler.h:
293
294 2013-09-14  Sam Weinig  <sam@webkit.org>
295
296         [CTTE] Node subclasses should take a Document by reference in their constructor (Part 4)
297         https://bugs.webkit.org/show_bug.cgi?id=121372
298
299         Reviewed by Eric Carlson.
300
301         Converts the following to take a Document reference:
302             - HTMLFormControlElement
303             - HTMLFormControlElementWithState
304             - HTMLMapElement
305             - HTMLMarqueeElement
306             - HTMLMediaElement
307             - HTMLMenuElement
308             - HTMLMetaElement
309             - HTMLMeterElement
310             - HTMLOListElement
311             - HTMLObjectElement
312             - HTMLOptGroupElement
313             - HTMLOptionElement
314             - HTMLOutputElement
315             - HTMLParagraphElement
316             - HTMLParamElement
317             - HTMLProgressElement
318             - HTMLScriptElement
319             - HTMLSelectElement
320             - HTMLSourceElement
321             - HTMLSpanElement
322             - HTMLStyleElement
323             - HTMLSummaryElement
324             - HTMLTableCellElement
325             - HTMLTableElement
326             - HTMLTableRowElement
327             - HTMLTableSectionElement
328             - HTMLTemplateElement
329             - HTMLTextAreaElement
330             - HTMLTextFormControlElement
331             - HTMLTitleElement
332             - HTMLTrackElement
333             - HTMLUListElement
334             - InlineStyleSheetOwner
335             - LabelableElement
336             - All the MediaControl elements
337
338 2013-09-14  Joseph Pecoraro  <pecoraro@apple.com>
339
340         XMLViewer_js and XMLViewer_css should be minified
341         https://bugs.webkit.org/show_bug.cgi?id=121334
342
343         Reviewed by Timothy Hatcher.
344
345         * CMakeLists.txt:
346         * DerivedSources.make:
347         * DerivedSources.pri:
348         * GNUmakefile.am:
349         * xml/XMLViewer.css:
350         * xml/XMLViewer.js:
351
352 2013-09-14  Eric Carlson  <eric.carlson@apple.com>
353
354         [MediaStream] remove MediaStream.label
355         https://bugs.webkit.org/show_bug.cgi?id=121337
356
357         Reviewed by Sam Weinig.
358
359         No new tests or modified tests, this attribute was apparently never tested.
360
361         * Modules/mediastream/MediaStream.h:
362         * Modules/mediastream/MediaStream.idl:
363
364 2013-09-14  Sam Weinig  <sam@webkit.org>
365
366         [CTTE] Node subclasses should take a Document by reference in their constructor (Part 3)
367         https://bugs.webkit.org/show_bug.cgi?id=121368
368
369         Reviewed by Darin Adler.
370
371         Converts the following to take a Document reference:
372             - DeleteButton
373             - DetailsContentElement
374             - DetailsMarkerControl
375             - DetailsSummaryElement
376             - HTMLBDIElement
377             - HTMLBRElement
378             - HTMLBaseElement
379             - HTMLBaseFontElement
380             - HTMLButtonElement
381             - HTMLCanvasElement
382             - HTMLDListElement
383             - HTMLDataListElement
384             - HTMLDetailsElement
385             - HTMLDirectoryElement
386             - HTMLDivElement
387             - HTMLEmbedElement
388             - HTMLFieldSetElement
389             - HTMLFontElement
390             - HTMLFormElement
391             - HTMLFrameElement
392             - HTMLFrameSetElement
393             - HTMLHRElement
394             - HTMLHeadElement
395             - HTMLHeadingElement
396             - HTMLHtmlElement
397             - HTMLIFrameElement
398             - HTMLImageElement
399             - HTMLInputElement
400             - HTMLKeygenElement
401             - HTMLLIElement
402             - HTMLLabelElement
403             - HTMLLegendElement
404             - HTMLLinkElement
405             - HTMLModElement
406             - HTMLPreElement
407             - HTMLQuoteElement
408             - HTMLTableCaptionElement
409             - HTMLTableColElement
410             - ImageDocumentElement
411             - KeygenSelectElement
412             - SummaryContentElement
413             - UploadButtonElement
414
415
416 2013-09-14  Zan Dobersek  <zdobersek@igalia.com>
417
418         REGRESSION(r155228): Call to DragData::asFragment() nullifies PassRefPtr<Range> in documentFragmentFromDragData
419         https://bugs.webkit.org/show_bug.cgi?id=121359
420
421         Reviewed by Darin Adler.
422
423         * page/DragController.cpp:
424         (WebCore::documentFragmentFromDragData): Pass the naked pointer as the PassRefPtr<Range> argument to the DragData::asFragment()
425         call. The naked pointer will get wrapped and protected by a new PassRefPtr. Passing the original PassRefPtr will also create
426         a new PassRefPtr, but will leak the reference of the original one, leaving its pointer nullified.
427
428 2013-09-14  Zan Dobersek  <zdobersek@igalia.com>
429
430         Unreviewed GTK build fix after r155774.
431
432         * bindings/scripts/CodeGeneratorGObject.pm:
433         (SkipFunction): Temporarily skip generation of bindings for the Console::profile() and Console::profileEnd() methods
434         as they're not correctly generated for the moment.
435
436 2013-09-14  Darin Adler  <darin@apple.com>
437
438         Shrink the nameToPseudoTypeMap function
439         https://bugs.webkit.org/show_bug.cgi?id=121367
440
441         Reviewed by Andreas Kling.
442
443         * css/CSSSelector.cpp:
444         (WebCore::populatePseudoTypeByNameMap): Replaces the old nameToPseudoTypeMap
445         function. Use a table instead of lots of globals and unrolled code to set up
446         the map.
447         (WebCore::CSSSelector::parsePseudoType): Updated to use the code above, and
448         also use a different style that's tighter.
449
450 2013-09-14  Darin Adler  <darin@apple.com>
451
452         Shrink the listMarkerText function
453         https://bugs.webkit.org/show_bug.cgi?id=121364
454
455         Reviewed by Andreas Kling.
456
457         Changed code to use StringBuilder, which is a better fit for what we are
458         doing here. But mainly, inlining was out of hand, so hit that with the
459         NEVER_INLINE stick. Might be worth revisiting this to optimize further for
460         speed by making StringBuilder better at this.
461
462         * rendering/RenderListMarker.cpp:
463         (WebCore::toRoman): NEVER_INLINE and use StringBuilder.
464         (WebCore::toAlphabeticOrNumeric): Use StringBuilder.
465         (WebCore::toSymbolic): NEVER_INLINE and use StringBuilder.
466         (WebCore::toAlphabetic): Ditto.
467         (WebCore::toNumeric): Ditto.
468         (WebCore::toHebrewUnder1000): NEVER_INLINE.
469         (WebCore::toHebrew): NEVER_INLINE and use StringBuilder.
470         (WebCore::toArmenianUnder10000): NEVER_INLINE.
471         (WebCore::toArmenian): NEVER_INLINE and use StringBuilder.
472         (WebCore::toGeorgian): NEVER_INLINE and use StringBuilder.
473         (WebCore::toCJKIdeographic): NEVER_INLINE and use StringBuilder.
474         (WebCore::listMarkerText): Use StringBuilder.
475
476 2013-09-14  Sam Weinig  <sam@webkit.org>
477
478         [CTTE] Node subclasses should take a Document by reference in their 
479         constructor (HTMLAnchorElement, HTMLAppletElement, HTMLAreaElement, HTMLAudioElement)
480         https://bugs.webkit.org/show_bug.cgi?id=121365
481
482         Reviewed by Andreas Kling.
483
484         * editing/CreateLinkCommand.cpp:
485         (WebCore::CreateLinkCommand::doApply):
486         * editing/UnlinkCommand.cpp:
487         (WebCore::UnlinkCommand::doApply):
488         * html/HTMLAnchorElement.cpp:
489         (WebCore::HTMLAnchorElement::HTMLAnchorElement):
490         (WebCore::HTMLAnchorElement::create):
491         * html/HTMLAnchorElement.h:
492         * html/HTMLAppletElement.cpp:
493         (WebCore::HTMLAppletElement::HTMLAppletElement):
494         (WebCore::HTMLAppletElement::create):
495         * html/HTMLAppletElement.h:
496         * html/HTMLAreaElement.cpp:
497         (WebCore::HTMLAreaElement::HTMLAreaElement):
498         (WebCore::HTMLAreaElement::create):
499         * html/HTMLAreaElement.h:
500         * html/HTMLAudioElement.cpp:
501         (WebCore::HTMLAudioElement::HTMLAudioElement):
502         (WebCore::HTMLAudioElement::create):
503         (WebCore::HTMLAudioElement::createForJSConstructor):
504         * html/HTMLAudioElement.h:
505         * html/HTMLTagNames.in:
506         * html/HTMLViewSourceDocument.cpp:
507         (WebCore::HTMLViewSourceDocument::addLink):
508         * page/DragController.cpp:
509         (WebCore::documentFragmentFromDragData):
510
511 2013-09-14  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
512
513         Get INPUT_SPEECH compiling for Nix, EFL and GTK
514         https://bugs.webkit.org/show_bug.cgi?id=121362
515
516         r154257 was not applied completely in HTMLInputElement.cpp and there was a wrong method signature
517         in TextControlInnerElements.
518         Also adding the files needed to build INPUT_SPEECH to each build system files.
519
520         Reviewed by Andreas Kling.
521
522         No new tests needed.
523
524         * CMakeLists.txt:
525         * GNUmakefile.list.am:
526         * html/HTMLInputElement.cpp:
527         (WebCore::HTMLInputElement::parseAttribute):
528         * html/shadow/TextControlInnerElements.h:
529
530 2013-09-14  Alberto Garcia  <berto@igalia.com>
531
532         Missing  allow-none introspection annotation for DomDocument.evaluate method
533         https://bugs.webkit.org/show_bug.cgi?id=118310
534
535         Reviewed by Martin Robinson.
536
537         Add (allow-none) introspection annotation to parameters that can
538         be NULL.
539
540         * bindings/scripts/CodeGeneratorGObject.pm:
541         (GenerateFunction):
542
543 2013-09-14  Sam Weinig  <sam@webkit.org>
544
545         [CTTE] Node subclasses should take a Document by reference in their constructor (HTMLBodyElement)
546         https://bugs.webkit.org/show_bug.cgi?id=121363
547
548         Reviewed by Andreas Kling.
549
550         * dom/make_names.pl:
551         (defaultTagPropertyHash):
552         (printConstructorInterior):
553         Add a new property, 'constructorTakesDocumentReference', to indicate that the class
554         has been converted to take a Document by reference. Once all classes are converted, this
555         will go away.
556
557         * html/HTMLTagNames.in:
558         Add the 'constructorTakesDocumentReference' property to the <body> tag as an initial
559         step.
560
561         * html/HTMLBodyElement.cpp:
562         (WebCore::HTMLBodyElement::HTMLBodyElement):
563         (WebCore::HTMLBodyElement::create):
564         * html/HTMLBodyElement.h:
565         Modify the constructor and create functions of HTMLBodyElement to take a Document reference.
566
567         * editing/markup.cpp:
568         (WebCore::createFragmentFromMarkup):
569         (WebCore::createFragmentForTransformToFragment):
570         * html/HTMLViewSourceDocument.cpp:
571         (WebCore::HTMLViewSourceDocument::createContainingTable):
572         Update callers of HTMLBodyElement::create() to pass a Document reference.
573
574 2013-09-14  Darin Adler  <darin@apple.com>
575
576         * rendering/RenderListMarker.cpp: Roll out accidentally-checked-in-code.
577
578 2013-09-14  Darin Adler  <darin@apple.com>
579
580         Add NeverDestroyed::get
581         https://bugs.webkit.org/show_bug.cgi?id=121358
582
583         Reviewed by Anders Carlsson.
584
585         * html/HTMLElement.cpp:
586         (WebCore::HTMLElement::parseAttribute): Use auto and the new get
587         function to make this code less repetitive.
588
589 2013-09-14  Sam Weinig  <sam@webkit.org>
590
591         There is no need for any custom bindings for Console
592         https://bugs.webkit.org/show_bug.cgi?id=121338
593
594         Reviewed by Timothy Hatcher.
595
596         * GNUmakefile.list.am:
597         * Target.pri:
598         * UseJSC.cmake:
599         * WebCore.vcxproj/WebCore.vcxproj:
600         * WebCore.vcxproj/WebCore.vcxproj.filters:
601         * WebCore.xcodeproj/project.pbxproj:
602         * bindings/js/JSBindingsAllInOne.cpp:
603         Remove JSConsoleCustom.cpp from project files.
604
605         * bindings/js/JSConsoleCustom.cpp:
606         Removed.
607
608         * page/Console.cpp:
609         (WebCore::Console::profile):
610         (WebCore::Console::profileEnd):
611         * page/Console.h:
612         Swap the order of the arguments to appease the bindings generator.
613
614         * page/Console.idl:
615         Add the [CallWith=ScriptState] attribute to pass the ExecState
616         and [TreatNullAs=NullString, TreatUndefinedAs=NullString] to get
617         the right stringification.
618
619 2013-09-14  Anders Carlsson  <andersca@apple.com>
620
621         AnimationBase::m_animation is never null
622         https://bugs.webkit.org/show_bug.cgi?id=121360
623
624         Reviewed by Darin Adler.
625
626         Enforce this by using references instead of pointers.
627
628         * page/animation/AnimationBase.cpp:
629         * page/animation/AnimationBase.h:
630         * page/animation/CompositeAnimation.cpp:
631         * page/animation/ImplicitAnimation.cpp:
632         * page/animation/ImplicitAnimation.h:
633         * page/animation/KeyframeAnimation.cpp:
634         * page/animation/KeyframeAnimation.h:
635
636 2013-09-14  Darin Adler  <darin@apple.com>
637
638         Shrink the function that builds the event listener attribute name map
639         https://bugs.webkit.org/show_bug.cgi?id=121354
640
641         Reviewed by Andreas Kling.
642
643         * html/HTMLElement.cpp:
644         (WebCore::populateEventNameForAttributeLocalNameMap): Added. Uses a
645         table to populate the map.
646         (WebCore::eventNameForAttributeLocalNameMap): Added. Uses NeverDestroyed
647         to allocate a map, but does not initialize it.
648         (WebCore::HTMLElement::parseAttribute): Put code to use map in here.
649
650         * html/HTMLElement.h: Removed eventNameForAttributeName, no longer
651         a member function.
652
653 2013-09-14  Alberto Garcia  <berto@igalia.com>
654
655         [GTK] WebKitGTK+ is linking against libxslt in too many places
656         https://bugs.webkit.org/show_bug.cgi?id=121356
657
658         Reviewed by Martin Robinson.
659
660         Don't use LIBXSLT_CFLAGS when compiling libWebCorePlatform and
661         libWebCoreGtk, no source files use libxslt there.
662
663         * GNUmakefile.am:
664
665 2013-09-14  Joseph Pecoraro  <pecoraro@apple.com>
666
667         Web Inspector: InjectedScriptSource_js and InjectedScriptCanvasModuleSource_js should be minified
668         https://bugs.webkit.org/show_bug.cgi?id=121183
669
670         Reviewed by Timothy Hatcher.
671
672         * CMakeLists.txt:
673         * DerivedSources.make:
674         * DerivedSources.pri:
675         * GNUmakefile.am:
676         Minify files at build time before running xxd.pl.
677
678         * WebCore.xcodeproj/project.pbxproj:
679         * inspector/InjectedScriptCanvasModuleSource.js:
680         * inspector/InjectedScriptSource.js:
681         Strip trailing whitespace (touching the files so the derived sources are regenerated).
682
683         * inspector/InspectorOverlayPage.css: Added.
684         * inspector/InspectorOverlayPage.html:
685         * inspector/InspectorOverlayPage.js: Copied from Source/WebCore/inspector/InspectorOverlayPage.html.
686         Move JS and CSS to external files. They are inlined and minified at build time.
687
688         * inspector/Scripts/cssmin.py: Added.
689         * inspector/Scripts/jsmin.py: Added.
690         Copied from WebInspectorUI/Scripts.
691
692         * inspector/Scripts/inline-and-minify-stylesheets-and-scripts.py: Added.
693         Add a script that can inline stylesheets and scripts. For minifying InspectorOverlayPage.html.
694
695 2013-09-14  Zan Dobersek  <zdobersek@igalia.com>
696
697         Unreviewed, fixing debug GTK builds after r155709.
698
699         * platform/gtk/PasteboardGtk.cpp:
700         (WebCore::Pasteboard::write): Assert that the PasteboardURL's URL is not empty.
701
702 2013-09-14  Andreas Kling  <akling@apple.com>
703
704         CTTE: RenderDetailsMarker is never anonymous.
705         <https://webkit.org/b/121355>
706
707         Reviewed by Darin Adler.
708
709         This renderer is never anonymous, and always has a corresponding DetailsMarkerControl.
710         Couldn't resist cleaning up the class a little bit, adding OVERRIDE and making
711         toRenderDetailsMarker() into a reference version.
712
713 2013-09-14  Andreas Kling  <akling@apple.com>
714
715         CTTE: RenderRubyAs{Block,Inline} are never anonymous.
716         <https://webkit.org/b/121353>
717
718         Reviewed by Darin Adler.
719
720         Replace element() with existingElement() and spam class with OVERRIDE.
721         Removed bogus removeLeftoverAnonymousBlock() override in RenderRubyAsInline
722         since it didn't override anything from a parent class.
723
724 2013-09-14  Andreas Kling  <akling@apple.com>
725
726         CTTE: RenderRubyText is never anonymous.
727         <https://webkit.org/b/121352>
728
729         Reviewed by Darin Adler.
730
731         Replace element() with existingElement() and spam class with OVERRIDE.
732
733 2013-09-14  Andreas Kling  <akling@apple.com>
734
735         CTTE: RenderSVGBlock renderers are never anonymous.
736         <https://webkit.org/b/121351>
737
738         Reviewed by Antti Koivisto.
739
740         RenderSVGBlock inherits from RenderBlockFlow, so needs separate treatment
741         from RenderSVGModelObject.
742
743         But like RSMO, these renderers are never anonymous, so add strongly typed
744         reference getters and do away with some magical type casts.
745
746 2013-09-14  Andreas Kling  <akling@apple.com>
747
748         CTTE: RenderSVGModelObject renderers are never anonymous.
749         <https://webkit.org/b/121350>
750
751         Reviewed by Darin Adler.
752
753         Flip the switch, turning RenderSVGModelObject::element() into a reference.
754
755 2013-09-13  Andreas Kling  <akling@apple.com>
756
757         CTTE: RenderSVGResourceClipper always has an SVGClipPathElement.
758         <https://webkit.org/b/121349>
759
760         Reviewed by Darin Adler.
761
762         This renderer is never anonymous. Tighten things up with a clipPathElement()
763         reference getter. Removed some unnecessary null checks and type casts.
764
765 2013-09-13  Andreas Kling  <akling@apple.com>
766
767         CTTE: RenderSVGResourceFilter always has an SVGFilterElement.
768         <https://webkit.org/b/121348>
769
770         Reviewed by Darin Adler.
771
772         This renderer is never anonymous. Tighten things up with a filterElement()
773         reference getter. Removed some unnecessary null checks and type casts.
774
775 2013-09-13  Darin Adler  <darin@apple.com>
776
777         Use a better name than m_invertibleCTM
778         https://bugs.webkit.org/show_bug.cgi?id=121341
779
780         Reviewed by Andreas Kling.
781
782         Rename isTransformInvertible to hasInvertibleTransform, and
783         m_invertibleCTM to m_hasInvertibleTransform.
784
785         * html/canvas/CanvasPathMethods.cpp:
786         (WebCore::CanvasPathMethods::moveTo):
787         (WebCore::CanvasPathMethods::lineTo):
788         (WebCore::CanvasPathMethods::quadraticCurveTo):
789         (WebCore::CanvasPathMethods::bezierCurveTo):
790         (WebCore::CanvasPathMethods::arcTo):
791         (WebCore::CanvasPathMethods::arc):
792         (WebCore::CanvasPathMethods::rect):
793         Updated for name change. Not really sure the name is good here,
794         because DOMPath doesn't have a transform at all; should switch
795         to a better name some day.
796
797         * html/canvas/CanvasPathMethods.h: Renamed, added a new constructor,
798         and made the virtual function private.
799
800         * html/canvas/CanvasRenderingContext2D.cpp:
801         (WebCore::CanvasRenderingContext2D::State::State):
802         (WebCore::CanvasRenderingContext2D::State::operator=):
803         (WebCore::CanvasRenderingContext2D::scale):
804         (WebCore::CanvasRenderingContext2D::rotate):
805         (WebCore::CanvasRenderingContext2D::translate):
806         (WebCore::CanvasRenderingContext2D::transform):
807         (WebCore::CanvasRenderingContext2D::setTransform):
808         (WebCore::CanvasRenderingContext2D::fill):
809         (WebCore::CanvasRenderingContext2D::stroke):
810         (WebCore::CanvasRenderingContext2D::clip):
811         (WebCore::CanvasRenderingContext2D::isPointInPath):
812         (WebCore::CanvasRenderingContext2D::isPointInStroke):
813         (WebCore::CanvasRenderingContext2D::clearRect):
814         (WebCore::CanvasRenderingContext2D::fillRect):
815         (WebCore::CanvasRenderingContext2D::strokeRect):
816         (WebCore::CanvasRenderingContext2D::drawImage):
817         (WebCore::CanvasRenderingContext2D::didDraw):
818         (WebCore::CanvasRenderingContext2D::drawTextInternal):
819         Updated for name change.
820
821         * html/canvas/CanvasRenderingContext2D.h: Updated for name change.
822         Also got rid of unneeded conditional around forward class declaration.
823
824         * html/canvas/DOMPath.h: Moved SVG-specific include into a
825         separate paragraph. Removed unneeded invocation  of WTF_MAKE_NONCOPYABLE,
826         which is already true since we inherit from RefCounted. Changed create
827         function argument to be a const*. Eliminated extra constructors that were
828         unneeded. Made the path-parsing create function SVG-only, rather than
829         compiling a useless empty one when compiling without SVG.
830
831 2013-09-13  Andreas Kling  <akling@apple.com>
832
833         CTTE: Tighter element types for RenderSVGResourceGradient and subclasses.
834         <https://webkit.org/b/121346>
835
836         Reviewed by Darin Adler
837
838         Codify the following:
839
840         - RenderSVGResourceGradient always has an SVGGradientElement.
841         - RenderSVGResourceLinearGradient always has an SVGLinearGradientElement.
842         - RenderSVGResourceRadialGradient always has an SVGRadialGradientElement.
843
844         None of these renderers are ever anonymous, so delete element() and provide
845         strongly typed reference getters instead.
846
847         Also made RenderSVGResourceGradient constructor protected since it should
848         never be instantiated directly.
849
850 2013-09-13  Andreas Kling  <akling@apple.com>
851
852         CTTE: RenderSVGResourceMarker always has an SVGMarkerElement.
853         <https://webkit.org/b/121345>
854
855         Reviewed by Brent Fulgham.
856
857         This renderer is never anonymous. Tighten things up with a maskElement()
858         reference getter. Removed some unnecessary type casts and assertions.
859
860 2013-09-13  Andreas Kling  <akling@apple.com>
861
862         CTTE: RenderSVGResourceMasker always has an SVGMaskElement.
863         <https://webkit.org/b/121344>
864
865         Reviewed by Brent Fulgham.
866
867         This renderer is never anonymous. Tighten things up with a maskElement()
868         reference getter. Removed some unnecessary null checks and assertions.
869
870 2013-09-13  Commit Queue  <commit-queue@webkit.org>
871
872         Unreviewed, rolling out r155738.
873         http://trac.webkit.org/changeset/155738
874         https://bugs.webkit.org/show_bug.cgi?id=121342
875
876         Broke many tests (Requested by ap on #webkit).
877
878         * GNUmakefile.list.am:
879         * Target.pri:
880         * UseJSC.cmake:
881         * WebCore.vcxproj/WebCore.vcxproj:
882         * WebCore.vcxproj/WebCore.vcxproj.filters:
883         * WebCore.xcodeproj/project.pbxproj:
884         * bindings/js/JSBindingsAllInOne.cpp:
885         * bindings/js/JSConsoleCustom.cpp: Added.
886         (WebCore::JSConsole::profile):
887         (WebCore::JSConsole::profileEnd):
888         * bindings/js/ScriptState.h:
889         * page/Console.cpp:
890         (WebCore::Console::profile):
891         (WebCore::Console::profileEnd):
892         * page/Console.h:
893         * page/Console.idl:
894
895 2013-09-12  Ryosuke Niwa  <rniwa@webkit.org>
896
897         CSSPropertyAnimation::ensurePropertyMap() is large
898         https://bugs.webkit.org/show_bug.cgi?id=121199
899
900         Reviewed by Darin Adler.
901
902         The bug was caused by repeated calls to Vector::append. Avoid it by storing pointers in a local array
903         and then adding them as we traverse them through to fill m_propertyToIdMap. Also reserve the full
904         initial capacity at once to avoid repeated calls to FastMalloc and FastFree.
905
906         * page/animation/CSSPropertyAnimation.cpp:
907         (WebCore::CSSPropertyAnimationWrapperMap::instance):
908         (WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty):
909         (WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex):
910         (WebCore::CSSPropertyAnimationWrapperMap::indexFromPropertyID):
911         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Renamed from ensurePropertyMap.
912         Also merged addShorthandProperties into it since they have to access local variables of the other.
913
914 2013-09-13  Ryuan Choi  <ryuan.choi@samsung.com>
915
916         Unreviewed build fix for EFL port.
917
918         * editing/efl/EditorEfl.cpp:
919         * platform/efl/PasteboardEfl.cpp:
920         (WebCore::Pasteboard::read):
921         (WebCore::Pasteboard::write):
922
923 2013-09-13  Sam Weinig  <sam@webkit.org>
924
925         Fix a few lingering ScriptStates.
926
927         Reviewed by Andy Estes.
928
929         * Modules/indexeddb/IDBCursor.cpp:
930         (WebCore::IDBCursor::update):
931         * Modules/indexeddb/IDBObjectStore.cpp:
932         (WebCore::IDBObjectStore::add):
933         (WebCore::IDBObjectStore::put):
934         * bindings/cpp/WebNativeNodeFilterCondition.cpp:
935         (WebNativeNodeFilterCondition::acceptNode):
936         * bindings/cpp/WebNativeNodeFilterCondition.h:
937         * dom/CustomElementConstructor.cpp:
938         (WebCore::CustomElementConstructor::create):
939         * dom/CustomElementConstructor.h:
940         * dom/CustomElementRegistry.cpp:
941         (WebCore::CustomElementRegistry::registerElement):
942         * dom/CustomElementRegistry.h:
943         * plugins/PluginView.cpp:
944         (WebCore::PluginView::performRequest):
945
946 2013-09-13  Darin Adler  <darin@apple.com>
947
948         Rename confusingly named "runtimeObject" functions
949         https://bugs.webkit.org/show_bug.cgi?id=121339
950
951         Also CTTE: HTMLElement.
952
953         Reviewed by Sam Weinig.
954
955         * bindings/js/JSHTMLAppletElementCustom.cpp:
956         (WebCore::JSHTMLAppletElement::putDelegate): Renamed.
957         (WebCore::JSHTMLAppletElement::getCallData): Renamed.
958         * bindings/js/JSHTMLEmbedElementCustom.cpp:
959         (WebCore::JSHTMLEmbedElement::putDelegate): Renamed.
960         (WebCore::JSHTMLEmbedElement::getCallData): Renamed.
961         * bindings/js/JSHTMLObjectElementCustom.cpp:
962         (WebCore::JSHTMLObjectElement::putDelegate): Renamed.
963         (WebCore::JSHTMLObjectElement::getCallData): Renamed.
964
965         * bindings/js/JSPluginElementFunctions.cpp:
966         (WebCore::isPluginElement): Changed to take HTMLElement&.
967         (WebCore::pluginInstance): Ditto.
968         (WebCore::pluginScriptObjectFromPluginViewBase): Updated for name and type change.
969         (WebCore::pluginScriptObject): Ditto.
970         (WebCore::pluginElementPropertyGetter): Ditto.
971         (WebCore::pluginElementCustomGetOwnPropertySlot): Ditto.
972         (WebCore::pluginElementCustomPut): Ditto.
973         (WebCore::pluginElementGetCallData): Ditto.
974
975         * bindings/js/JSPluginElementFunctions.h: Updated names and types.
976
977         * bindings/objc/WebScriptObject.mm:
978         (+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
979         Updated for type change.
980         * bridge/runtime_method.cpp:
981         (JSC::callRuntimeMethod): Ditto.
982
983 2013-09-13  Sam Weinig  <sam@webkit.org>
984
985         There is no need for any custom bindings for Console
986         https://bugs.webkit.org/show_bug.cgi?id=121338
987
988         Reviewed by Joseph Pecoraro.
989
990         * GNUmakefile.list.am:
991         * Target.pri:
992         * UseJSC.cmake:
993         * WebCore.vcxproj/WebCore.vcxproj:
994         * WebCore.vcxproj/WebCore.vcxproj.filters:
995         * WebCore.xcodeproj/project.pbxproj:
996         * bindings/js/JSBindingsAllInOne.cpp:
997         Remove JSConsoleCustom.cpp from project files.
998
999         * bindings/js/JSConsoleCustom.cpp:
1000         Removed.
1001
1002         * page/Console.cpp:
1003         (WebCore::Console::profile):
1004         (WebCore::Console::profileEnd):
1005         * page/Console.h:
1006         Swap the order of the arguments to appease the bindings generator.
1007
1008         * page/Console.idl:
1009         Add the [CallWith=ScriptState] attribute to pass the ExecState
1010         and [TreatNullAs=NullString, TreatUndefinedAs=NullString] to get
1011         the right stringification.
1012
1013 2013-09-13  Sam Weinig  <sam@webkit.org>
1014
1015         Part 2 of Replace ScriptState with JSC::ExecState
1016         https://bugs.webkit.org/show_bug.cgi?id=121336
1017
1018         * dom/Document.h:
1019         There is no WebCore::JSC namespace!
1020
1021 2013-09-13  Sam Weinig  <sam@webkit.org>
1022
1023         Replace ScriptState with JSC::ExecState
1024         https://bugs.webkit.org/show_bug.cgi?id=121336
1025
1026         Reviewed by Darin Adler.
1027
1028         * Modules/indexeddb/IDBCursor.h:
1029         * Modules/indexeddb/IDBObjectStore.h:
1030         * bindings/js/JSInjectedScriptHostCustom.cpp:
1031         * bindings/js/JSInjectedScriptManager.cpp:
1032         * bindings/js/JSNodeCustom.cpp:
1033         * bindings/js/JSNodeFilterCondition.h:
1034         * bindings/js/ScriptController.cpp:
1035         * bindings/js/ScriptDebugServer.cpp:
1036         * bindings/js/ScriptDebugServer.h:
1037         * bindings/js/ScriptEventListener.cpp:
1038         * bindings/js/ScriptEventListener.h:
1039         * bindings/js/ScriptFunctionCall.cpp:
1040         * bindings/js/ScriptFunctionCall.h:
1041         * bindings/js/ScriptObject.cpp:
1042         * bindings/js/ScriptObject.h:
1043         * bindings/js/ScriptProfiler.cpp:
1044         * bindings/js/ScriptProfiler.h:
1045         * bindings/js/ScriptState.cpp:
1046         * bindings/js/ScriptState.h:
1047         * bindings/js/ScriptValue.cpp:
1048         * bindings/js/ScriptValue.h:
1049         * bindings/js/SerializedScriptValue.cpp:
1050         * bindings/js/SerializedScriptValue.h:
1051         * dom/Document.cpp:
1052         * dom/Document.h:
1053         * dom/NodeFilter.cpp:
1054         * dom/NodeFilter.h:
1055         * dom/NodeFilterCondition.cpp:
1056         * dom/NodeFilterCondition.h:
1057         * dom/NodeIterator.cpp:
1058         * dom/NodeIterator.h:
1059         * dom/ScriptExecutionContext.cpp:
1060         * dom/ScriptExecutionContext.h:
1061         * dom/Traversal.cpp:
1062         * dom/Traversal.h:
1063         * dom/TreeWalker.cpp:
1064         * dom/TreeWalker.h:
1065         * inspector/ConsoleMessage.cpp:
1066         * inspector/ConsoleMessage.h:
1067         * inspector/InjectedScript.h:
1068         * inspector/InjectedScriptBase.cpp:
1069         * inspector/InjectedScriptBase.h:
1070         * inspector/InjectedScriptCanvasModule.cpp:
1071         * inspector/InjectedScriptCanvasModule.h:
1072         * inspector/InjectedScriptHost.cpp:
1073         * inspector/InjectedScriptHost.h:
1074         * inspector/InjectedScriptManager.cpp:
1075         * inspector/InjectedScriptManager.h:
1076         * inspector/InjectedScriptModule.cpp:
1077         * inspector/InjectedScriptModule.h:
1078         * inspector/InspectorAgent.cpp:
1079         * inspector/InspectorCanvasAgent.cpp:
1080         * inspector/InspectorCanvasAgent.h:
1081         * inspector/InspectorConsoleAgent.cpp:
1082         * inspector/InspectorConsoleAgent.h:
1083         * inspector/InspectorConsoleInstrumentation.h:
1084         * inspector/InspectorDOMAgent.cpp:
1085         * inspector/InspectorDebuggerAgent.cpp:
1086         * inspector/InspectorDebuggerAgent.h:
1087         * inspector/InspectorFrontendClientLocal.cpp:
1088         * inspector/InspectorFrontendHost.cpp:
1089         * inspector/InspectorIndexedDBAgent.cpp:
1090         * inspector/InspectorInstrumentation.cpp:
1091         * inspector/InspectorInstrumentation.h:
1092         * inspector/PageConsoleAgent.cpp:
1093         * inspector/PageDebuggerAgent.cpp:
1094         * inspector/PageRuntimeAgent.cpp:
1095         * inspector/PageRuntimeAgent.h:
1096         * inspector/ScriptArguments.cpp:
1097         * inspector/ScriptArguments.h:
1098         * inspector/ScriptDebugListener.h:
1099         * inspector/WorkerDebuggerAgent.cpp:
1100         * inspector/WorkerRuntimeAgent.cpp:
1101         * page/Console.cpp:
1102         * page/Console.h:
1103         * page/ContentSecurityPolicy.cpp:
1104         * page/ContentSecurityPolicy.h:
1105         * page/PageConsole.cpp:
1106         * page/PageConsole.h:
1107         * workers/WorkerGlobalScope.cpp:
1108         * workers/WorkerGlobalScope.h:
1109
1110 2013-09-13  Sam Weinig  <sam@webkit.org>
1111
1112         Chrome, DragController and FocusController should hold onto a Page&
1113         https://bugs.webkit.org/show_bug.cgi?id=121325
1114
1115         Reviewed by Anders Carlsson.
1116
1117         * editing/FrameSelection.cpp:
1118         * editing/FrameSelection.h:
1119         * page/Chrome.cpp:
1120         (WebCore::Chrome::Chrome):
1121         (WebCore::Chrome::scroll):
1122         (WebCore::Chrome::createWindow):
1123         (WebCore::canRunModalIfDuringPageDismissal):
1124         (WebCore::Chrome::runBeforeUnloadConfirmPanel):
1125         (WebCore::Chrome::runJavaScriptAlert):
1126         (WebCore::Chrome::runJavaScriptConfirm):
1127         (WebCore::Chrome::runJavaScriptPrompt):
1128         (WebCore::Chrome::mouseDidMoveOverElement):
1129         (WebCore::Chrome::setToolTip):
1130         (WebCore::Chrome::windowScreenDidChange):
1131         * page/Chrome.h:
1132         * page/DragController.cpp:
1133         * page/DragController.h:
1134         * page/mac/DragControllerMac.mm:
1135         * page/FocusController.cpp:
1136         * page/FocusController.h:
1137         * page/Page.cpp:
1138         (WebCore::Page::Page):
1139         * page/PageGroupLoadDeferrer.cpp:
1140         * page/PageGroupLoadDeferrer.h:
1141         Take references where possible.
1142
1143 2013-09-13  Anders Carlsson  <andersca@apple.com>
1144
1145         Use nullptr instead of 0 in calls to HashMap::add
1146         https://bugs.webkit.org/show_bug.cgi?id=121322
1147
1148         Reviewed by Sam Weinig.
1149
1150         * bridge/IdentifierRep.cpp:
1151         (WebCore::IdentifierRep::get):
1152         * css/CSSFontFaceSource.cpp:
1153         (WebCore::CSSFontFaceSource::getFontData):
1154         * css/CSSFontSelector.cpp:
1155         (WebCore::CSSFontSelector::getFontFace):
1156         * css/CSSSegmentedFontFace.cpp:
1157         (WebCore::CSSSegmentedFontFace::getFontData):
1158         * css/CSSValuePool.cpp:
1159         (WebCore::CSSValuePool::createFontFamilyValue):
1160         (WebCore::CSSValuePool::createFontFaceValue):
1161         * dom/ChildListMutationScope.cpp:
1162         (WebCore::ChildListMutationAccumulator::getOrCreate):
1163         * dom/Document.cpp:
1164         (WebCore::Document::getCSSCanvasElement):
1165         * dom/NodeRareData.h:
1166         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
1167         (WebCore::NodeListsNodeData::addCacheWithName):
1168         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
1169         * loader/appcache/ApplicationCacheStorage.cpp:
1170         (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
1171         * page/PageGroup.cpp:
1172         (WebCore::PageGroup::pageGroup):
1173         * page/animation/AnimationController.cpp:
1174         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
1175         * platform/mac/ScrollbarThemeMac.mm:
1176         (WebCore::ScrollbarThemeMac::registerScrollbar):
1177         * storage/StorageNamespaceImpl.cpp:
1178         (WebCore::StorageNamespaceImpl::localStorageNamespace):
1179
1180 2013-09-13  Sam Weinig  <sam@webkit.org>
1181
1182         ContextMenuController should hold onto a Page&
1183         https://bugs.webkit.org/show_bug.cgi?id=121320
1184
1185         Reviewed by Anders Carlsson.
1186
1187         * page/ContextMenuController.cpp:
1188         (WebCore::ContextMenuController::ContextMenuController):
1189         (WebCore::ContextMenuController::~ContextMenuController):
1190         (WebCore::ContextMenuController::showContextMenu):
1191         (WebCore::ContextMenuController::contextMenuItemSelected):
1192         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1193         (WebCore::ContextMenuController::showContextMenuAt):
1194         * page/ContextMenuController.h:
1195         Store the Page and ContextMenuClient as references.
1196
1197         * page/Page.cpp:
1198         (WebCore::Page::Page):
1199         Pass the Page and ContextMenuClient as references and switch to using createOwned<>().
1200
1201 2013-09-13  Tim Horton  <timothy_horton@apple.com>
1202
1203         Apply OVERRIDE and FINAL to Image subclasses and clean them up
1204         https://bugs.webkit.org/show_bug.cgi?id=121086
1205
1206         Reviewed by Alexey Proskuryakov.
1207
1208         Everything other than the copious application of OVERRIDE and FINAL
1209         is explicitly called out below.
1210
1211         * WebCore.exp.in:
1212         Export the correct version of getCGImageRef for use by WebKit2.
1213
1214         * platform/graphics/BitmapImage.cpp:
1215         * platform/graphics/BitmapImage.h:
1216         Drive-by inline isBitmapImage.
1217         Move create(HBITMAP) to be near the other create() functions.
1218         Move all of the members private.
1219         Devirtualize frameCount().
1220         Move notSolidColor() near the other solid color functions.
1221
1222         * platform/graphics/CrossfadeGeneratedImage.cpp:
1223         (WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
1224         (WebCore::CrossfadeGeneratedImage::drawPattern):
1225         * platform/graphics/GeneratorGeneratedImage.cpp:
1226         (WebCore::GeneratorGeneratedImage::draw):
1227         (WebCore::GeneratorGeneratedImage::drawPattern):
1228         Use size() and setContainerSize() instead of directly accessing a
1229         superclass' (now private, previously protected) members.
1230
1231         * platform/graphics/CrossfadeGeneratedImage.h:
1232         * platform/graphics/GeneratedImage.h:
1233         Make m_size private, I don't think we do protected members.
1234         
1235         * platform/graphics/GeneratorGeneratedImage.h:
1236         Make all the members private.
1237
1238         * svg/graphics/SVGImage.h:
1239         * svg/graphics/SVGImageForContainer.h:
1240
1241 2013-09-13  Alexey Proskuryakov  <ap@apple.com>
1242
1243         [Mac] WebCore Web Inspector files are only copied as part of clean build
1244         https://bugs.webkit.org/show_bug.cgi?id=121316
1245
1246         Reviewed by Timothy Hatcher.
1247
1248         Removed insufficient dependencies to make the phase run unconditionally.
1249
1250         * WebCore.xcodeproj/project.pbxproj:
1251
1252 2013-09-13  Eric Carlson  <eric.carlson@apple.com>
1253
1254         CodeGeneratorJS doesn't generate header includes for sequence<type>
1255         https://bugs.webkit.org/show_bug.cgi?id=121314
1256
1257         Reviewed by Dean Jackson.
1258
1259         * bindings/scripts/CodeGeneratorJS.pm:
1260         (SkipIncludeHeader): Don't return false for sequence and array types.
1261         (AddIncludesForType): Do add includes for sequence and array types.
1262         (GenerateCallbackImplementation):
1263         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Regenerated
1264         * bindings/scripts/test/JS/JSTestTypedefs.h: Ditto.
1265         * bindings/scripts/test/TestTypedefs.idl: Add a method that takes a sequence<TestEventTarget>.
1266
1267 2013-09-13  Andreas Kling  <akling@apple.com>
1268
1269         CTTE: RenderSVGResourcePattern always has an SVGPatternElement.
1270         <https://webkit.org/b/121313>
1271
1272         Reviewed by Anders Carlsson.
1273
1274         This renderer is never anonymous. Tighten things up with a patternElement()
1275         reference getter. Removed some unnecessary null checks and assertions.
1276
1277 2013-09-13  Darin Adler  <darin@apple.com>
1278
1279         Remove layering-violating Pasteboard::plainText function (for all platforms now)
1280         https://bugs.webkit.org/show_bug.cgi?id=121312
1281
1282         Reviewed by Antti Koivisto.
1283
1284         * editing/Editor.cpp:
1285         (WebCore::Editor::pasteAsPlainTextWithPasteboard): Call readPlainTextFromPasteboard
1286         on all platforms, not just Mac and EFL. Also call canSmartReplaceWithPasteboard with
1287         a reference instead of a pointer.
1288         (WebCore::Editor::readPlainTextFromPasteboard): Added. This is a cross-platform
1289         version of what was previously a Mac-only function.
1290         (WebCore::Editor::plainTextFromPasteboard): Added. This is the simple non-Mac version
1291         of this function.
1292         (WebCore::Editor::pasteWithPasteboard): Updated to call canSmartReplaceWithPasteboard
1293         with a reference.
1294         (WebCore::Editor::canSmartReplaceWithPasteboard): Updated to take a reference.
1295
1296         * editing/Editor.h: Make readPlainTextFromPasteboard cross-platform instead of
1297         Mac-only. Also changed argument to canSmartReplaceWithPasteboard to be a reference.
1298         Also added private plainTextFromPasteboard function.
1299
1300         * editing/mac/EditorMac.mm:
1301         (WebCore::Editor::pasteWithPasteboard): Updated to call canSmartReplaceWithPasteboard
1302         with a reference.
1303         (WebCore::Editor::plainTextFromPasteboard): Added. Contains the Mac-specific parts
1304         of the readPlainTextFromPasteboard function.
1305
1306         * platform/Pasteboard.h: Fixed a conditional in the PasteboardPlainText struct to
1307         omit iOS. Removed the layering-voiolating plainText function.
1308
1309         * platform/blackberry/PasteboardBlackBerry.cpp:
1310         (WebCore::Pasteboard::read): Renamed from plainText and updated to new calling
1311         convention.
1312         * platform/gtk/PasteboardGtk.cpp:
1313         (WebCore::Pasteboard::read): Ditto.
1314         * platform/ios/PasteboardIOS.mm:
1315         (WebCore::Pasteboard::read): Ditto.
1316         * platform/nix/PasteboardNix.cpp:
1317         (WebCore::Pasteboard::read): Ditto.
1318         * platform/qt/PasteboardQt.cpp:
1319         (WebCore::Pasteboard::read): Ditto.
1320         * platform/win/PasteboardWin.cpp:
1321         (WebCore::Pasteboard::read): Ditto.
1322
1323 2013-09-13  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
1324
1325         [GTK] Move to the new web inspector
1326         https://bugs.webkit.org/show_bug.cgi?id=120647
1327
1328         Reviewed by Carlos Garcia Campos.
1329
1330         No tests for the new inspector UI as of yet.
1331
1332         * GNUmakefile.am: no longer install the deprecated inspector UI files.
1333         * WebCore.exp.in: add SchemeRegistry symbol that is now used.
1334
1335 2013-09-13  Darin Adler  <darin@apple.com>
1336
1337         Try to fix Qt build.
1338
1339         * platform/qt/PasteboardQt.cpp:
1340         (WebCore::Pasteboard::write): Update variable name at one place I missed.
1341
1342 2013-09-13  Arvid Nilsson  <anilsson@rim.com>
1343
1344         [BlackBerry] Scrolling and zooming is slow when Flash plugin visible
1345         https://bugs.webkit.org/show_bug.cgi?id=120618
1346
1347         Reviewed by Anders Carlsson.
1348         Internally reviewed by Jacky Jiang.
1349
1350         JIRA 490823
1351         Compositing Flash plugin content triggered a workaround for a graphics
1352         driver quirk. The workaround was actually related to WebGL, not Flash,
1353         back when we used glCopyTexImage to implement WebGL double buffering
1354         (see PR 148933 and 150228 for more details of the old implementation).
1355
1356         Originally, both WebGL and plugin layers added themselves to the
1357         LayerRenderer::m_layersLockingTextureResources list. Now only plugin
1358         layers use this list.
1359         The glCopyTexImage code was removed long ago, and WebGL now uses the
1360         EGLImage-based double buffering approach implemented in
1361         EGLImageLayerWebKitThread and EGLImageLayerCompositingThreadClient.
1362
1363         Fixed by removing the now obsolete workaround, a call to "glFinish".
1364         This considerably improves the frame rate of zooming and scrolling when
1365         Flash content is visible.
1366
1367         Improvement in frame rate not appropriate to test using layout tests,
1368         could easily result in flaky test.
1369
1370         * platform/graphics/blackberry/LayerRenderer.cpp:
1371         (WebCore::LayerRenderer::compositeLayers):
1372
1373 2013-09-13  Zoltan Horvath  <zoltan@webkit.org>
1374
1375         Move LineLayoutState class to LineLayoutState.h
1376         https://bugs.webkit.org/show_bug.cgi?id=121263
1377
1378         Reviewed by Ryosuke Niwa.
1379
1380         I added bitfields, reordered the members and a functions too.
1381
1382         No new tests, no behavior change.
1383
1384         * rendering/LineLayoutState.h: Added.
1385         (WebCore::LineLayoutState::LineLayoutState):
1386         (WebCore::LineLayoutState::markForFullLayout):
1387         (WebCore::LineLayoutState::isFullLayout):
1388         (WebCore::LineLayoutState::usesRepaintBounds):
1389         (WebCore::LineLayoutState::setRepaintRange):
1390         (WebCore::LineLayoutState::updateRepaintRangeFromBox):
1391         (WebCore::LineLayoutState::endLineMatched):
1392         (WebCore::LineLayoutState::setEndLineMatched):
1393         (WebCore::LineLayoutState::checkForFloatsFromLastLine):
1394         (WebCore::LineLayoutState::setCheckForFloatsFromLastLine):
1395         (WebCore::LineLayoutState::lineInfo):
1396         (WebCore::LineLayoutState::endLineLogicalTop):
1397         (WebCore::LineLayoutState::setEndLineLogicalTop):
1398         (WebCore::LineLayoutState::endLine):
1399         (WebCore::LineLayoutState::setEndLine):
1400         (WebCore::LineLayoutState::lastFloat):
1401         (WebCore::LineLayoutState::setLastFloat):
1402         (WebCore::LineLayoutState::floats):
1403         (WebCore::LineLayoutState::floatIndex):
1404         (WebCore::LineLayoutState::setFloatIndex):
1405         (WebCore::LineLayoutState::adjustedLogicalLineTop):
1406         (WebCore::LineLayoutState::setAdjustedLogicalLineTop):
1407         (WebCore::LineLayoutState::flowThread):
1408         (WebCore::LineLayoutState::setFlowThread):
1409         * rendering/RenderBlockLineLayout.cpp: Remove LineLayoutState.
1410
1411 2013-09-13  Darin Adler  <darin@apple.com>
1412
1413         Remove layering-violating Pasteboard::writeURL (for all platforms now)
1414         https://bugs.webkit.org/show_bug.cgi?id=121306
1415
1416         Reviewed by Antti Koivisto.
1417
1418         * editing/Editor.cpp:
1419         (WebCore::Editor::copyURL): Move the contents of the writeURLToPasteboard function
1420         in here.
1421
1422         * editing/Editor.h: Removed Mac-specific writeURLToPasteboard, added private
1423         Mac-specific fillInUserVisibleForm function for the one Mac-specific part of writing URLs.
1424
1425         * editing/efl/EditorEfl.cpp: Deleted Editor::writeURLToPasteboard.
1426
1427         * editing/mac/EditorMac.mm: Deleted Editor::writeURLToPasteboard, moving the code
1428         into copyURL.
1429         (WebCore::Editor::fillInUserVisibleForm): Added.
1430
1431         * page/DragController.cpp:
1432         (WebCore::DragController::startDrag): Call copyURL instead of writeURL or
1433         writeURLToPasteboard.
1434
1435         * platform/Pasteboard.h: Fixed up the PasteboardURL struct so it's suitable for
1436         cross-platform use. Removed the writeURL function. Removed the Frame* argument from
1437         the Windows-specific writeURLToDataObject function.
1438
1439         * platform/blackberry/PasteboardBlackBerry.cpp:
1440         (WebCore::Pasteboard::write): Renamed/refactored from writeURL.
1441         * platform/gtk/PasteboardGtk.cpp:
1442         (WebCore::Pasteboard::write): Ditto.
1443         * platform/nix/PasteboardNix.cpp:
1444         (WebCore::Pasteboard::write): Ditto.
1445         * platform/qt/PasteboardQt.cpp:
1446         (WebCore::Pasteboard::write): Ditto.
1447         * platform/win/PasteboardWin.cpp:
1448         (WebCore::Pasteboard::writeURLToDataObject): Removed unused Frame* argument.
1449         (WebCore::Pasteboard::write): Renamed/refactored from writeURL.
1450
1451 2013-09-13  Chris Fleizach  <cfleizach@apple.com>
1452
1453         AX: AXPress does not work in SVG
1454         https://bugs.webkit.org/show_bug.cgi?id=121248
1455
1456         Reviewed by Mario Sanchez Prada.
1457
1458         Implement accessKeyAction() on SVGElements, which is what accessibility code
1459         uses in order to activate Elements.
1460
1461         Test: accessibility/svg-element-press.html
1462
1463         * svg/SVGElement.cpp:
1464         (WebCore::SVGElement::accessKeyAction):
1465         * svg/SVGElement.h:
1466
1467 2013-09-13  Andreas Kling  <akling@apple.com>
1468
1469         [CTTE] RenderSVGTransformableContainer is never anonymous.
1470         <https://webkit.org/b/121304>
1471
1472         Reviewed by Anders Carlsson.
1473
1474         This renderer is never anonymous. Tighten things up with a graphicsElement()
1475         reference getter.
1476
1477 2013-09-13  Andreas Kling  <akling@apple.com>
1478
1479         [CTTE] RenderSVGImage always has a SVGImageElement.
1480         <https://webkit.org/b/121301>
1481
1482         Reviewed by Anders Carlsson.
1483
1484         This renderer is never anonymous, and always has a corresponding SVGImageElement.
1485
1486 2013-09-13  Andreas Kling  <akling@apple.com>
1487
1488         [CTTE] Tighter element types for RenderSVGShape and subclasses.
1489         <https://webkit.org/b/121302>
1490
1491         Reviewed by Antti Koivisto.
1492
1493         Codify the following:
1494
1495         - RenderSVGPath always has an SVGGraphicsElement.
1496         - RenderSVGEllipse always has an SVGGraphicsElement.
1497         - RenderSVGRect always has an SVGRectElement.
1498         - RenderSVGShape always has an SVGGraphicsElement.
1499
1500         None of these renderers are ever anonymous, so delete element() and provide
1501         strongly typed reference getters instead.
1502
1503 2013-09-13  Andreas Kling  <akling@apple.com>
1504
1505         [CTTE] RenderSVGResourceFilterPrimitive always has an SVGFilterPrimitiveStandardAttributes.
1506         <https://webkit.org/b/121300>
1507
1508         Reviewed by Anders Carlsson.
1509
1510         This renderer is never anonymous, and always has a corresponding SVGFilterPrimitiveStandardAttributes element. 
1511
1512 2013-09-12  Darin Adler  <darin@apple.com>
1513
1514         Finish removing layer-violating code from Pasteboard (just for Mac during this first step)
1515         https://bugs.webkit.org/show_bug.cgi?id=121279
1516
1517         Reviewed by Anders Carlsson.
1518
1519         * editing/Editor.h: Added webContentFromPasteboard member function, private nested class
1520         WebContentReader, private createFragmentForImageResourceAndAddResource and
1521         createFragmentAndAddResources member functions.
1522
1523         * editing/mac/EditorMac.mm: Re-sorted includes and added some.
1524         (WebCore::Editor::pasteWithPasteboard): Call the new webContentFromPasteboard function.
1525         (WebCore::Editor::insertParagraphSeparatorInQuotedContent): Comment tweak.
1526         (WebCore::styleForSelectionStart): Removed an unneeded call to String::impl.
1527         (WebCore::Editor::readPlainTextFromPasteboard): Updated to use an isURL boolean instead
1528         of a separate string named "url".
1529         (WebCore::Editor::WebContentReader::readWebArchive): Added. Contains reworked code that
1530         was originally in Pasteboard::documentFragment.
1531         (WebCore::Editor::WebContentReader::readFilenames): Ditto.
1532         (WebCore::Editor::WebContentReader::readHTML): Ditto.
1533         (WebCore::Editor::WebContentReader::readRTFD): Ditto.
1534         (WebCore::Editor::WebContentReader::readRTF): Ditto.
1535         (WebCore::Editor::WebContentReader::readImage): Ditto.
1536         (WebCore::Editor::WebContentReader::readURL): Ditto.
1537         (WebCore::Editor::WebContentReader::readPlainText): Ditto.
1538         (WebCore::Editor::webContentFromPasteboard): Added. Uses WebContentReader to read the
1539         content from the pasteboard.
1540         (WebCore::Editor::createFragmentForImageResourceAndAddResource): Added. Helper used
1541         by code above.
1542         (WebCore::Editor::createFragmentAndAddResources): Ditto.
1543
1544         * platform/Pasteboard.h: Added new PasteboardWebContentReader abstract class so
1545         client can get the various types of pasteboard content and stop on the kind it
1546         can handle. Improved comments and formatting a bit. Removed documentFragment
1547         when compiling for PLATFORM(MAC).
1548
1549         * platform/mac/DragDataMac.mm:
1550         (WebCore::DragData::asFragment): Changed to use Editor::webContentFromPasteboard.
1551
1552         * platform/mac/PasteboardMac.mm:
1553         (WebCore::Pasteboard::read): Updated the plain text overload of this for changes
1554         to the struct that holds the result. Added a new web content overload of this,
1555         which retains the pasteboard-reading part of Pasteboard::documentFragment, but
1556         omits the document fragment construction part.
1557
1558 2013-09-13  Andreas Kling  <akling@apple.com>
1559
1560         [CTTE] RenderSVGText always has a SVGTextElement.
1561         <https://webkit.org/b/121299>
1562
1563         Reviewed by Antti Koivisto.
1564
1565         This renderer is never anonymous, and always has a corresponding <svg> element.
1566         Tighten this up and remove some pointless assertions.
1567
1568 2013-09-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1569
1570         Remove support for QXmlStream as the XML parser.
1571         https://bugs.webkit.org/show_bug.cgi?id=121229
1572
1573         Reviewed by Andreas Kling.
1574
1575         Remove the implementation and all the #ifdef related to it.
1576
1577         * Target.pri:
1578         * WebCore.pri:
1579         * dom/TransformSource.h:
1580         * xml/XMLErrors.h:
1581         * xml/XSLStyleSheet.h:
1582         * xml/XSLTProcessor.h:
1583         * xml/parser/XMLDocumentParser.cpp:
1584         (WebCore::XMLDocumentParser::enterText):
1585         (WebCore::toString):
1586         (WebCore::XMLDocumentParser::exitText):
1587         (WebCore::XMLDocumentParser::insertErrorMessageBlock):
1588         * xml/parser/XMLDocumentParser.h:
1589         * xml/parser/XMLDocumentParserQt.cpp: Removed.
1590
1591 2013-09-13  Andreas Kling  <akling@apple.com>
1592
1593         [CTTE] RenderSVGViewportContainer always has a SVGSVGElement.
1594         <https://webkit.org/b/121297>
1595
1596         Reviewed by Antti Koivisto.
1597
1598         This renderer is never anonymous, and always has a corresponding <svg> element.
1599         Tighten this up and remove some pointless null checks and type checks.
1600
1601 2013-09-13  Andreas Kling  <akling@apple.com>
1602
1603         [CTTE] RenderSVGRoot always has a SVGSVGElement.
1604         <https://webkit.org/b/121293>
1605
1606         Reviewed by Antti Koivisto.
1607
1608         This renderer is never anonymous, and always has a corresponding <svg> element.
1609         Tighten this up and remove some pointless null checks and assertions.
1610
1611 2013-09-13  Andreas Kling  <akling@apple.com>
1612
1613         Remove support for anonymous deprecated flexboxes.
1614         <https://webkit.org/b/121288>
1615
1616         Reviewed by Antti Koivisto.
1617
1618         There are no remaining internal clients of RenderDeprecatedFlexibleBox,
1619         Nuke a FIXME from r143643 where the move to basing renderers on new flexbox started.
1620
1621         This was the only user of anonymous deprecated flexbox, so removed the ability to
1622         construct those.
1623
1624         Also removed some Chrome-related feature observation gunk from constructor.
1625
1626 2013-09-13  Andreas Kling  <akling@apple.com>
1627
1628         [CTTE] RenderMultiColumnBlock is never anonymous.
1629         <https://webkit.org/b/121292>
1630
1631         Reviewed by Antti Koivisto.
1632
1633         Hide element() and provide existingElement() instead, returning an Element&.
1634
1635 2013-09-13  Andreas Kling  <akling@apple.com>
1636
1637         [CTTE] RenderGrid is never anonymous.
1638         <https://webkit.org/b/121290>
1639
1640         Reviewed by Antti Koivisto.
1641
1642         Hide element() and provide existingElement() instead, returning an Element&.
1643
1644 2013-09-13  Andreas Kling  <akling@apple.com>
1645
1646         [CTTE] RenderTableCaption is never anonymous.
1647         <https://webkit.org/b/121289>
1648
1649         Reviewed by Antti Koivisto.
1650
1651         Hide element() and provide existingElement() instead, returning an Element&.
1652
1653 2013-09-13  Andreas Kling  <akling@apple.com>
1654
1655         [CTTE] RenderTableCol is never anonymous.
1656         <https://webkit.org/b/121286>
1657
1658         Reviewed by Antti Koivisto.
1659
1660         Hide element() and provide existingElement() instead, returning an Element&.
1661         Removed one bogus null check that was exposed.
1662
1663 2013-09-13  Andreas Kling  <akling@apple.com>
1664
1665         [CTTE] RenderListItem is never anonymous.
1666         <https://webkit.org/b/121285>
1667
1668         Reviewed by Antti Koivisto.
1669
1670         Hide element() and provide existingElement() instead, returning an Element&.
1671         Removed some bogus assertions that were exposed by this.
1672
1673 2013-09-13  Andreas Kling  <akling@apple.com>
1674
1675         [CTTE] Tighter element types for RenderSVGInline and subclasses.
1676         <https://webkit.org/b/121283>
1677
1678         Reviewed by Antti Koivisto.
1679
1680         Codify the following:
1681
1682         - RenderSVGInline always has an SVGGraphicsElement.
1683         - RenderSVGTextPath always has an SVGTextPathElement.
1684         - RenderSVGTSpan always has an SVGTextPositioningElement.
1685
1686         None of these renderers are ever anonymous, so delete element() and provide
1687         strongly typed reference getters instead.
1688
1689 2013-09-13  Andreas Kling  <akling@apple.com>
1690
1691         [CTTE] RenderFileUploadControl always has a HTMLInputElement.
1692         <https://webkit.org/b/121278>
1693
1694         Reviewed by Darin Adler.
1695
1696         RenderFileUploadControl is never anonymous and always has a corresponding HTMLInputElement.
1697
1698 2013-09-13  Andreas Kling  <akling@apple.com>
1699
1700         [CTTE] RenderFieldset always has a HTMLFieldSetElement.
1701         <https://webkit.org/b/121277>
1702
1703         Reviewed by Darin Adler.
1704
1705         RenderFieldset is never anonymous and always has a corresponding HTMLFieldSetElement.
1706
1707 2013-09-13  Andreas Kling  <akling@apple.com>
1708
1709         [CTTE] RenderButton always has a HTMLFormControlElement.
1710         <https://webkit.org/b/121281>
1711
1712         Reviewed by Antti Koivisto.
1713
1714         RenderButton is never anonymous and has either a <button> or an <input> element,
1715         and their nearest shared ancestor is HTMLFormControlElement.
1716
1717 2013-09-13  Darin Adler  <darin@apple.com>
1718
1719         Give actions in Range class NON_SHOUTING_NAMES
1720         https://bugs.webkit.org/show_bug.cgi?id=121280
1721
1722         Reviewed by Andreas Kling.
1723
1724         * dom/Range.cpp:
1725         (WebCore::Range::deleteContents):
1726         (WebCore::Range::processContents):
1727         (WebCore::Range::processContentsBetweenOffsets):
1728         (WebCore::Range::processNodes):
1729         (WebCore::Range::processAncestorsAndTheirSiblings):
1730         (WebCore::Range::extractContents):
1731         (WebCore::Range::cloneContents):
1732         * dom/Range.h:
1733         Just let do-webcore-rename do its thing.
1734         - DELETE_CONTENTS -> Delete
1735         - EXTRACT_CONTENTS -> Extract
1736         - CLONE_CONTENTS -> Clone
1737
1738 2013-09-12  Santosh Mahto  <santosh.ma@samsung.com>
1739
1740         [EFL]Background Style of element not visible because of  default theme style
1741         https://bugs.webkit.org/show_bug.cgi?id=117405
1742
1743         Reviewed by Gyuyoung Kim.
1744
1745         When select element is styled with css background property(color/image) the styling
1746         gets hidden by Combo box non transparent image. This patch handle the
1747         case and transparent images are used when select image is styled. So
1748         now background-color and background-image are visible across the Combo box
1749         
1750         The code is added to support css styling of other theme control,
1751         Basically an extra signal is emitted to edje which change the state 
1752         of edje object whenever the control is styled.
1753
1754         Covered by existing test case, updated the test expected image.
1755
1756         * platform/efl/DefaultTheme/CMakeLists.txt:
1757         * platform/efl/DefaultTheme/widget/combo/combo.edc:
1758         * platform/efl/DefaultTheme/widget/combo/combo_focus_button_transparent.png: Added.
1759         * platform/efl/DefaultTheme/widget/combo/combo_focus_transparent.png: Added.
1760         * platform/efl/DefaultTheme/widget/combo/combo_hover_button_transparent.png: Added.
1761         * platform/efl/DefaultTheme/widget/combo/combo_hover_transparent.png: Added.
1762         * platform/efl/DefaultTheme/widget/combo/combo_normal_button_transparent.png: Added.
1763         * platform/efl/DefaultTheme/widget/combo/combo_normal_transparent.png: Added.
1764         * platform/efl/DefaultTheme/widget/combo/combo_press_button_transparent.png: Added.
1765         * platform/efl/DefaultTheme/widget/combo/combo_press_transparent.png: Added.
1766         * platform/efl/RenderThemeEfl.cpp:
1767         (WebCore::RenderThemeEfl::applyEdjeStateFromForm):
1768         (WebCore::RenderThemeEfl::isControlStyled):
1769         (WebCore::RenderThemeEfl::paintThemePart):
1770         * platform/efl/RenderThemeEfl.h:
1771
1772 2013-09-12  Andreas Kling  <akling@apple.com>
1773
1774         [CTTE] RenderMenuList always has a HTMLSelectElement.
1775         <https://webkit.org/b/121276>
1776
1777         Reviewed by Anders Carlsson.
1778
1779         This renderer is never anonymous and always has a corresponding HTMLSelectElement.
1780         Deleted element() in favor of HTMLSelectElement& selectElement().
1781
1782 2013-09-12  Andreas Kling  <akling@apple.com>
1783
1784         [CTTE] Tighten RenderTextControl element typing.
1785         <https://webkit.org/b/121275>
1786
1787         Reviewed by Anders Carlsson.
1788
1789         Codify these invariants:
1790
1791         - RenderTextControl always has a HTMLTextFormControl.
1792         - RenderSearchField always has a HTMLInputElement.
1793         - RenderTextControlSingleLine always has a HTMLInputElement.
1794
1795         None of these renderers are ever anonymous. Deleted element() and added
1796         strongly typed reference getters instead.
1797
1798 2013-09-12  Andreas Kling  <akling@apple.com>
1799
1800         [CTTE] RenderListMarker is always anonymous and owned by RenderListItem.
1801         <https://webkit.org/b/121274>
1802
1803         Reviewed by Anders Carlsson.
1804
1805         Store a RenderListItem& instead of a pointer in RenderListMarker.
1806         Deleted the element() function since list markers are always anonymous.
1807
1808 2013-09-12  Andreas Kling  <akling@apple.com>
1809
1810         [CTTE] RenderListBox's element is always a HTMLSelectElement.
1811         <https://webkit.org/b/121273>
1812
1813         Reviewed by Anders Carlsson.
1814
1815         Hide element() on RenderListBox and make selectElement() return a reference
1816         since this renderer cannot be anonymous.
1817
1818 2013-09-12  Andreas Kling  <akling@apple.com>
1819
1820         [CTTE] RenderHTMLCanvas's element is always a HTMLCanvasElement.
1821         <https://webkit.org/b/121272>
1822
1823         Reviewed by Anders Carlsson.
1824
1825         Add RenderHTMLCanvas::canvasElement(), hiding element().
1826         This function also returns a reference since this renderer cannot be anonymous.
1827
1828 2013-09-12  Andreas Kling  <akling@apple.com>
1829
1830         [CTTE] RenderTextControlMultiLine's element is always a HTMLTextAreaElement.
1831         <https://webkit.org/b/121271>
1832
1833         Reviewed by Anders Carlsson.
1834
1835         Add RenderTextControlMultiLine::textAreaElement(), hiding element().
1836         This function also returns a reference since this renderer cannot be anonymous.
1837
1838 2013-09-12  Tim Horton  <timothy_horton@apple.com>
1839
1840         [mac] Cache rendered image in PDFDocumentImage
1841         https://bugs.webkit.org/show_bug.cgi?id=121207
1842
1843         Reviewed by Simon Fraser.
1844
1845         Tests: fast/images/pdf-as-image-too-big.html
1846
1847         * loader/cache/CachedImage.cpp:
1848         (WebCore::CachedImage::createImage):
1849         PDFDocumentImage takes a ImageObserver now so that it can report
1850         decoded data size changes to the memory cache.
1851
1852         * platform/graphics/Image.h:
1853         (WebCore::Image::isPDFDocumentImage): Added.
1854
1855         * platform/graphics/cg/PDFDocumentImage.cpp:
1856         (WebCore::PDFDocumentImage::PDFDocumentImage):
1857         PDFDocumentImage takes a ImageObserver now so that it can report
1858         decoded data size changes to the memory cache.
1859
1860         (WebCore::PDFDocumentImage::applyRotationForPainting):
1861         Fix up some comments, and use GraphicsContext instead of CG API.
1862
1863         (WebCore::PDFDocumentImage::cacheParametersMatch):
1864         Determine whether our cached image is still valid, given the new
1865         destination's size, CTM scale, and source rect.
1866
1867         (WebCore::transformContextForPainting): Added.
1868
1869         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
1870         Cache a rendered bitmap of the PDF. Invalidate the cache if cacheParametersMatch
1871         decides that the parameters don't match, unless we're painting in low quality mode,
1872         in which case we'll scale the existing image (and then fully repaint when the
1873         high-quality repaint timer fires).
1874         Inform the memory cache of our new size.
1875
1876         (WebCore::PDFDocumentImage::draw):
1877         Update the cached image if needed.
1878         Paint the cached image into the context if it's available (which it might not be,
1879         if the image is way too big and the allocation fails). Otherwise, paint straight
1880         into the context as we previously did.
1881
1882         (WebCore::PDFDocumentImage::destroyDecodedData):
1883         Throw away the cached image if requested.
1884
1885         (WebCore::PDFDocumentImage::decodedSize):
1886         (WebCore::PDFDocumentImage::drawPDFPage):
1887         Drive-by use GraphicsContext instead of CG directly.
1888
1889         * platform/graphics/cg/PDFDocumentImage.h:
1890         (WebCore::PDFDocumentImage::create):
1891         Override isPDFDocumentImage().
1892         Add storage for the cached image buffer and various cache parameters.
1893
1894         * rendering/ImageQualityController.cpp:
1895         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1896         PDFDocumentImage is also interested in/capable of low-quality painting now.
1897
1898 2013-09-12  Tim Horton  <timothy_horton@apple.com>
1899
1900         Image doesn't always repaint at high quality in all tiles after a live resize
1901         https://bugs.webkit.org/show_bug.cgi?id=121244
1902
1903         Reviewed by Darin Adler.
1904
1905         Currently, ImageQualityController removes an image from its low-quality-images
1906         list from inside shouldPaintAtLowQuality, if this is the first paint outside
1907         of a live resize, but does not force the renderer to repaint in its entirety.
1908
1909         However, there's no guarantee we've invalidated the whole renderer, so this can
1910         leave some parts of the image painted in low-quality.
1911
1912         This just removes a short-circuit, instead using the ordinary high-quality-repaint
1913         timer to ensure that the entire renderer is repainted.
1914
1915         No new test; all attempts have failed, as this depends on tiled drawing
1916         and a live resize occurring.
1917
1918         * rendering/ImageQualityController.cpp:
1919         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1920
1921 2013-09-12  Brent Fulgham  <bfulgham@apple.com>
1922
1923         [EFL] Speculative build fix after r155638.
1924
1925         * platform/efl/PasteboardEfl.cpp: Add include for PassRefPtr, which
1926         is no longer implicitly included.
1927
1928 2013-09-12  Simon Fraser  <simon.fraser@apple.com>
1929
1930         Avoid extra scrollbar-related layouts for overlay scrollbars
1931         https://bugs.webkit.org/show_bug.cgi?id=121267
1932
1933         Reviewed by Beth Dakin.
1934
1935         If ScrollView::updateScrollbars() detected that scrollbars were added
1936         and removed, it would call contentsResized(), which calls setNeedsLayout(),
1937         followed by visibleContentsResized() which would trigger layout. There is no
1938         point doing this with overlay scrollbars, so avoid it by having 
1939         setHas*Scrollbar() return true if the addition/removal of a scrollbar changed
1940         the available width.
1941         
1942         No tests: we can't test overlay scrollbars in tests.
1943
1944         * page/FrameView.cpp:
1945         (WebCore::FrameView::setContentsSize): Drive-by assertion that
1946         checks that the unsigned m_deferSetNeedsLayouts doesn't wrap when
1947         decremented.
1948         * platform/ScrollView.cpp:
1949         (WebCore::ScrollView::setHasHorizontalScrollbar): Return true if the addition/removal
1950         changed available space.
1951         (WebCore::ScrollView::setHasVerticalScrollbar): Ditto.
1952         (WebCore::ScrollView::updateScrollbars): Only set sendContentResizedNotification
1953         if available space was changed by addition/removal of scrollbars.
1954         * platform/ScrollView.h:
1955
1956 2013-09-12  Zoltan Horvath  <zoltan@webkit.org>
1957
1958         [CSS Shapes] Rename shapeContainingBlockHeight to shapeContainingBlockLogicalHeight
1959         https://bugs.webkit.org/show_bug.cgi?id=121252
1960
1961         Reviewed by Oliver Hunt.
1962
1963         No new tests, no behavior change.
1964
1965         * rendering/RenderBlockLineLayout.cpp:
1966         (WebCore::pushShapeContentOverflowBelowTheContentBox):
1967         * rendering/shapes/ShapeInfo.h:
1968         (WebCore::ShapeInfo::shapeContainingBlockLogicalHeight):
1969
1970 2013-09-12  Samuel White  <samuel_white@apple.com>
1971
1972         <meter> element AXValue is listed as a writable value
1973         https://bugs.webkit.org/show_bug.cgi?id=117650
1974
1975         Reviewed by Chris Fleizach.
1976
1977         No new tests, updated existing accessibility/meter-element.html test
1978         to check writability. Changed meter element value to be unwritable.
1979
1980         * accessibility/AccessibilityRenderObject.cpp:
1981         (WebCore::AccessibilityRenderObject::canSetValueAttribute):
1982
1983 2013-09-12  Renata Hodovan  <reni@webkit.org>
1984
1985         [Qt] SHOULD NEVER BE REACHED is touched WebCore::InputType::createStepRange
1986         https://bugs.webkit.org/show_bug.cgi?id=121148
1987
1988         Reviewed by Kent Tamura.
1989
1990         Non-steppable input types must not rendered as slider even if its webkit-apperance style
1991         property is set to slider-vertical/horizontal.
1992
1993         Test: platform/qt/fast/forms/range/slider-crash-on-input.html
1994
1995         * platform/qt/RenderThemeQStyle.cpp:
1996         (WebCore::RenderThemeQStyle::paintSliderTrack):
1997
1998 2013-09-12  Ryosuke Niwa  <rniwa@webkit.org>
1999
2000         Qt and Windows build fix.
2001
2002         * page/animation/CSSPropertyAnimation.cpp:
2003
2004 2013-09-11  Ryosuke Niwa  <rniwa@webkit.org>
2005
2006         Encapsulate globals in CSSPropertyAnimation.cpp
2007         https://bugs.webkit.org/show_bug.cgi?id=121205
2008
2009         Reviewed by Antti Koivisto.
2010
2011         Encapsulated the globals inside a newly added CSSPropertyAnimationWrapperMap. Also removed the circular
2012         dependency from ShorthandPropertyWrapper's constructor to CSSPropertyAnimationWrapperMap::instance().
2013         The circular dependency still exists in ensurePropertyMap but I'm going to remove it in the bug 121199.
2014
2015         * page/animation/CSSPropertyAnimation.cpp:
2016         (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Takes a Vector of longhand wrappers instead of
2017         calling wrapperForProperty in the middle of constructing the very table. This circular dependency is now
2018         encapsulated in CSSPropertyAnimationWrapperMap::ensurePropertyMap.
2019         (WebCore::CSSPropertyAnimationWrapperMap::instance): Added.
2020         (WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty): Renamed from WebCore::wrapperForProperty.
2021         (WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex): Added.
2022         (WebCore::CSSPropertyAnimationWrapperMap::size): Added.
2023         (WebCore::CSSPropertyAnimationWrapperMap::addPropertyWrapper): Renamed from WebCore::addPropertyWrapper. Also
2024         cleaned up boolean logics to use early exits instead of nested ifs.
2025         (WebCore::CSSPropertyAnimationWrapperMap::addShorthandProperties): Renamed from WebCore::addShorthandProperties.
2026         (WebCore::CSSPropertyAnimationWrapperMap::ensurePropertyMap): Renamed from WebCore::ensurePropertyMap.
2027         Added an alias gPropertyWrappers for m_propertyWrappers; this aliasing will be removed in the bug 121199.
2028         (WebCore::CSSPropertyAnimation::blendProperties):
2029         (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
2030         (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
2031         (WebCore::CSSPropertyAnimation::propertiesEqual):
2032         (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
2033         (WebCore::CSSPropertyAnimation::getNumProperties):
2034         * page/animation/CSSPropertyAnimation.h:
2035         * rendering/style/RenderStyle.h:
2036
2037 2013-09-12  Anders Carlsson  <andersca@apple.com>
2038
2039         SharedBuffer::createNSData should return a RetainPtr<NSData>
2040         https://bugs.webkit.org/show_bug.cgi?id=121237
2041
2042         Reviewed by Darin Adler.
2043
2044         This makes memory management cleared and fixes a leak in PDFDocumentImage::createPDFDocument.
2045         We use a RetainPtr subclass as a stopgap measure to prevent code that does [buffer->createNSData() autorelease]
2046         from compiling and crashing due to the NSData object being overreleased.
2047
2048         * loader/ResourceBuffer.h:
2049         * loader/mac/ResourceBuffer.mm:
2050         (WebCore::ResourceBuffer::createNSData):
2051         * platform/SharedBuffer.h:
2052         (WebCore::SharedBuffer::NSDataRetainPtr::NSDataRetainPtr):
2053         * platform/graphics/mac/PDFDocumentImageMac.mm:
2054         (WebCore::PDFDocumentImage::createPDFDocument):
2055         * platform/mac/HTMLConverter.mm:
2056         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
2057         (fileWrapperForURL):
2058         * platform/mac/PasteboardMac.mm:
2059         (WebCore::fileWrapper):
2060         (WebCore::Pasteboard::read):
2061         (WebCore::documentFragmentWithRTF):
2062         (WebCore::fragmentFromWebArchive):
2063         * platform/mac/PlatformPasteboardMac.mm:
2064         (WebCore::PlatformPasteboard::setBufferForType):
2065         * platform/mac/SharedBufferMac.mm:
2066         (WebCore::SharedBuffer::createNSData):
2067
2068 2013-09-12  Timothy Hatcher  <timothy@apple.com>
2069
2070         Remove more Timeline stuff we don't use
2071         https://bugs.webkit.org/show_bug.cgi?id=121246
2072
2073         Reviewed by Joseph Pecoraro.
2074
2075         * inspector/InspectorController.cpp:
2076         * inspector/InspectorController.h:
2077         * inspector/InspectorDOMDebuggerAgent.cpp:
2078         * inspector/InspectorDOMDebuggerAgent.h:
2079         * inspector/InspectorProfilerAgent.cpp:
2080         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2081         * inspector/InspectorProfilerAgent.h:
2082         * inspector/InspectorTimelineAgent.cpp:
2083         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2084         * inspector/InspectorTimelineAgent.h:
2085
2086 2013-09-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2087
2088         [EFL] Get rid of layering violations in PasteboardEfl.cpp
2089         https://bugs.webkit.org/show_bug.cgi?id=121241
2090
2091         Reviewed by Darin Adler.
2092
2093         Get rid of layering violations in PasteboardEfl.cpp. For now, just mimic
2094         the Mac port to avoid divergences and leave port-specific functions
2095         unimplemented as the EFL port does not support the pasteboard functionality
2096         yet.
2097
2098         No new tests, no behavior change.
2099
2100         * PlatformEfl.cmake:
2101         * editing/Editor.cpp:
2102         (WebCore::Editor::pasteAsPlainTextWithPasteboard):
2103         (WebCore::Editor::cut):
2104         (WebCore::Editor::copy):
2105         (WebCore::Editor::copyURL):
2106         (WebCore::Editor::copyImage):
2107         * editing/Editor.h:
2108         * editing/efl/EditorEfl.cpp: Added.
2109         (WebCore::Editor::writeSelectionToPasteboard):
2110         (WebCore::Editor::writeURLToPasteboard):
2111         (WebCore::Editor::writeImageToPasteboard):
2112         (WebCore::Editor::readPlainTextFromPasteboard):
2113         (WebCore::Editor::pasteWithPasteboard):
2114         * page/DragController.cpp:
2115         (WebCore::DragController::startDrag):
2116         * platform/Pasteboard.h:
2117         * platform/efl/PasteboardEfl.cpp:
2118
2119 2013-09-12  Alberto Garcia  <berto@igalia.com>
2120
2121         [GTK] Unreviewed build fix after r155635.
2122
2123         Include DragData.h
2124
2125         * platform/gtk/PasteboardGtk.cpp:
2126
2127 2013-09-12  Brent Fulgham  <bfulgham@apple.com>
2128
2129         [Windows] Build fix after r155635.
2130
2131         Rubber Stamped by Darin Adler.
2132
2133         * platform/Pasteboard.h: Add missing compile guards for Windows port.
2134
2135 2013-09-12  Darin Adler  <darin@apple.com>
2136
2137         Reorganize Pasteboard.h to make it easier to read, and express plan for future work
2138         https://bugs.webkit.org/show_bug.cgi?id=121234
2139
2140         Reviewed by Anders Carlsson.
2141
2142         * platform/Pasteboard.h: Move Mac/iOS-specific pasteboard names to the bottom of the
2143         file rather than putting them up with forward declarations before the class. Removed
2144         unneeded forward class declarations. Changed #if statements about migration to the
2145         more modern non-layering-violation API to list platforms not yet migrated, rather than
2146         listing platforms that have migrated (Mac). Move conditional code down below the
2147         uncondiditional code so it's easier to see what the class is doing. Move layering-
2148         violation code down to the bottom too, so it's easier to see the future class without
2149         having the design mistakes mixed in. Sort platform-specific sections in alphabetical
2150         order instead of random order. Did the destructor in a cleaner way so the #if is out
2151         of the way after the class rather than in the class. Removed WebSmartPastePboardType,
2152         WebURLPboardType, and WebURLsWithTitlesPboard declarations, since they are only used
2153         inside the PasteboardMac.mm source file.
2154
2155         * platform/ios/PasteboardIOS.mm: Aded a FIXME comment.
2156         * platform/mac/PasteboardMac.mm: Made the constants for pasteboard types be actual
2157         constants, rather than global variables.
2158
2159 2013-09-12  Tamas Czene  <tczene@inf.u-szeged.hu>
2160
2161         [curl] Use utf8 for headers in CurlDownload.
2162         https://bugs.webkit.org/show_bug.cgi?id=120413
2163
2164         Reviewed by Brent Fulgham.
2165
2166         * platform/network/curl/CurlDownload.cpp:
2167         (WebCore::CurlDownload::headerCallback):
2168
2169 2013-09-12  Peter Gal  <galpeter@inf.u-szeged.hu>
2170
2171         [curl] Improve multipart response handling
2172         https://bugs.webkit.org/show_bug.cgi?id=117735
2173
2174         Reviewed by Brent Fulgham.
2175
2176         The multipart/x-mixed-replace mime type in responses are ignored
2177         with the curl network backend. To handle such responses the
2178         MultipartHandle is introduced which will split the content using
2179         the boundary specified by the mime type.
2180
2181         There are already existing tests (http/tests/multipart).
2182
2183         * WebCore.vcxproj/WebCore.vcxproj:
2184         * WebCore.vcxproj/WebCore.vcxproj.filters:
2185         * platform/network/HTTPParsers.cpp:
2186         (WebCore::parseHTTPHeader):
2187         * platform/network/HTTPParsers.h:
2188         * platform/network/ResourceHandleInternal.h:
2189         * platform/network/curl/MultipartHandle.cpp: Added.
2190         (WebCore::MultipartHandle::extractBoundary):
2191         (WebCore::MultipartHandle::matchForBoundary):
2192         (WebCore::MultipartHandle::checkForBoundary):
2193         (WebCore::MultipartHandle::parseHeadersIfPossible):
2194         (WebCore::MultipartHandle::contentReceived):
2195         (WebCore::MultipartHandle::processContent):
2196         (WebCore::MultipartHandle::contentEnded):
2197         (WebCore::MultipartHandle::didReceiveData):
2198         (WebCore::MultipartHandle::didReceiveResponse):
2199         * platform/network/curl/MultipartHandle.h: Added.
2200         (WebCore::MultipartHandle::MultipartHandle):
2201         (WebCore::MultipartHandle::~MultipartHandle):
2202         * platform/network/curl/ResourceHandleManager.cpp:
2203         (WebCore::writeCallback):
2204         (WebCore::headerCallback):
2205         (WebCore::ResourceHandleManager::downloadTimerCallback):
2206
2207 2013-09-12  Andreas Kling  <akling@apple.com>
2208
2209         Remove RenderApplet.
2210         <https://webkit.org/b/121231>
2211
2212         Reviewed by Darin Adler.
2213
2214         Add a RenderEmbeddedObject::createForApplet(HTMLAppletElement&) and nuke
2215         the RenderApplet class from orbit.
2216
2217 2013-09-12  Brent Fulgham  <bfulgham@apple.com>
2218
2219         [Windows] Build fix after r155621
2220
2221         Rubber-stamped by Anders Carlsson.
2222
2223         See also https://bugs.webkit.org/show_bug.cgi?id=121235 for
2224         why this was necessary.
2225
2226         * css/MediaQueryEvaluator.cpp: Work around VS compiler bug.
2227         * dom/make_names.pl: Ditto.
2228         * loader/archive/ArchiveFactory.cpp: Ditto.
2229         * rendering/svg/SVGPathData.cpp: Ditto.
2230
2231 2013-09-12  Anders Carlsson  <andersca@apple.com>
2232
2233         SharedBuffer::createCFData should return RetainPtr<CFDataRef>
2234         https://bugs.webkit.org/show_bug.cgi?id=121230
2235
2236         Reviewed by Darin Adler.
2237
2238         * loader/ResourceBuffer.cpp:
2239         (WebCore::ResourceBuffer::createCFData):
2240         * loader/ResourceBuffer.h:
2241         * loader/archive/cf/LegacyWebArchive.cpp:
2242         (WebCore::LegacyWebArchive::createPropertyListRepresentation):
2243         (WebCore::LegacyWebArchive::create):
2244         * platform/SharedBuffer.h:
2245         * platform/cf/SharedBufferCF.cpp:
2246         (WebCore::SharedBuffer::createCFData):
2247         * platform/graphics/cg/ImageSourceCG.cpp:
2248         (WebCore::ImageSource::setData):
2249         * platform/graphics/cg/PDFDocumentImage.cpp:
2250         (WebCore::PDFDocumentImage::createPDFDocument):
2251         * platform/graphics/mac/FontCustomPlatformData.cpp:
2252         (WebCore::createFontCustomPlatformData):
2253         * platform/mac/SharedBufferMac.mm:
2254         (WebCore::SharedBuffer::createCFData):
2255
2256 2013-09-12  Zoltan Horvath  <zoltan@webkit.org>
2257
2258         Move LineInfo class into LineInfo.h
2259         https://bugs.webkit.org/show_bug.cgi?id=121191
2260
2261         Reviewed by David Hyatt.
2262
2263         No new tests, no behavior change.
2264
2265         * GNUmakefile.list.am:
2266         * Target.pri:
2267         * WebCore.vcxproj/WebCore.vcxproj:
2268         * WebCore.xcodeproj/project.pbxproj:
2269         * rendering/LineInfo.h: Added.
2270         (WebCore::LineInfo::LineInfo):
2271         (WebCore::LineInfo::isFirstLine):
2272         (WebCore::LineInfo::isLastLine):
2273         (WebCore::LineInfo::isEmpty):
2274         (WebCore::LineInfo::previousLineBrokeCleanly):
2275         (WebCore::LineInfo::floatPaginationStrut):
2276         (WebCore::LineInfo::runsFromLeadingWhitespace):
2277         (WebCore::LineInfo::resetRunsFromLeadingWhitespace):
2278         (WebCore::LineInfo::incrementRunsFromLeadingWhitespace):
2279         (WebCore::LineInfo::setFirstLine):
2280         (WebCore::LineInfo::setLastLine):
2281         (WebCore::LineInfo::setEmpty):
2282         (WebCore::LineInfo::setPreviousLineBrokeCleanly):
2283         (WebCore::LineInfo::setFloatPaginationStrut):
2284         * rendering/RenderBlockLineLayout.cpp:
2285
2286 2013-09-12  Bem Jones-Bey  <bjonesbe@adobe.com>
2287
2288         [CSS Shapes] Remove unnecessarily complex template from ShapeInfo classes
2289         https://bugs.webkit.org/show_bug.cgi?id=121213
2290
2291         Reviewed by Darin Adler.
2292
2293         These classes were trying to be way too clever, and as a result were
2294         hard to read and hard to debug. Replace the complex templated method
2295         calls with virtual methods to make these classes much easier to
2296         understand and maintain.
2297
2298         No new tests, no behavior change.
2299
2300         * rendering/shapes/ShapeInfo.cpp:
2301         (WebCore::::computedShape):
2302         (WebCore::::computeSegmentsForLine):
2303         * rendering/shapes/ShapeInfo.h:
2304         * rendering/shapes/ShapeInsideInfo.cpp:
2305         (WebCore::ShapeInsideInfo::getShapeValue):
2306         * rendering/shapes/ShapeInsideInfo.h:
2307         (WebCore::ShapeInsideInfo::computeSegmentsForLine):
2308         (WebCore::ShapeInsideInfo::ShapeInsideInfo):
2309         * rendering/shapes/ShapeOutsideInfo.cpp:
2310         (WebCore::ShapeOutsideInfo::computeSegmentsForLine):
2311         (WebCore::ShapeOutsideInfo::getShapeValue):
2312         * rendering/shapes/ShapeOutsideInfo.h:
2313         (WebCore::ShapeOutsideInfo::ShapeOutsideInfo):
2314
2315 2013-09-12  Zoltan Horvath  <zoltan@webkit.org>
2316
2317         [CSS Shapes] Turn shape's logicalwidth/height into a LayoutSize
2318         https://bugs.webkit.org/show_bug.cgi?id=121187
2319
2320         Reviewed by David Hyatt.
2321
2322         No new tests, no behavior change.
2323
2324         * rendering/shapes/ShapeInfo.cpp:
2325         (WebCore::::computedShape):
2326         * rendering/shapes/ShapeInfo.h:
2327         (WebCore::ShapeInfo::setShapeSize):
2328         (WebCore::ShapeInfo::shapeContainingBlockHeight):
2329
2330 2013-09-12  Darin Adler  <darin@apple.com>
2331
2332         Move layering-violating code from Pasteboard::plainText into Editor (Mac only at first)
2333         https://bugs.webkit.org/show_bug.cgi?id=121075
2334
2335         Reviewed by Anders Carlsson.
2336
2337         * editing/Editor.cpp:
2338         (WebCore::Editor::pasteAsPlainTextBypassingDHTML): Pass pasteboard as a reference.
2339         (WebCore::Editor::pasteAsPlainTextWithPasteboard): Use readPlainTextFromPasteboard
2340         for Mac. Also update to take a reference.
2341         (WebCore::Editor::paste): Pass pasteboard as a reference.
2342         (WebCore::Editor::pasteAsPlainText): Ditto.
2343         * editing/Editor.h: Ditto.
2344
2345         * editing/mac/EditorMac.mm:
2346         (WebCore::Editor::readSelectionFromPasteboard): Pass pasteboard as a reference.
2347         (WebCore::Editor::readPlainTextFromPasteboard): Added. The declaration of this
2348         was added (by mistake) in an earlier patch. This has code that used to be inside
2349         Pasteboard::plainText.
2350
2351         * platform/Pasteboard.h: Added PasteboardPlainText. Reorganized functions in the
2352         Pasteboard class and added some FIXMEs. Sorted platforms alphabetically and grouped
2353         functions together and data members separate from them.
2354
2355         * platform/mac/DragDataMac.mm:
2356         (WebCore::DragData::asPlainText): Updated to call readPlainTextFromPasteboard.
2357         (WebCore::DragData::asURL): Tweaked style of unused parameter.
2358
2359         * platform/mac/PasteboardMac.mm:
2360         (WebCore::Pasteboard::read): Renamed this from plainText, and refactored so that
2361         the data goes out in the PasteboardPlainText structure.
2362
2363 2013-09-12  Gurpreet Kaur  <k.gurpreet@samsung.com>
2364
2365         CSS Unit vw in border-width maps to 0px.
2366         https://bugs.webkit.org/show_bug.cgi?id=109229
2367
2368         Reviewed by Darin Adler.
2369
2370         Border and outline properties were not applied incase
2371         its values were given in vh/vw units.
2372
2373         Tests: fast/css/viewport-height-border.html
2374                fast/css/viewport-height-outline.html
2375                fast/css/viewport-width-border.html
2376                fast/css/viewport-width-outline.html
2377
2378         * css/CSSPrimitiveValue.cpp:
2379         (WebCore::CSSPrimitiveValue::computeLengthDouble):
2380         Added case CSS_VH and CSS_VW. 
2381         * css/CSSPrimitiveValue.h:
2382         (WebCore::CSSPrimitiveValue::isViewportPercentageWidth):
2383         (WebCore::CSSPrimitiveValue::isViewportPercentageHeight):
2384         Added APIs to check the unit type(CSS_VW and CSS_VH). 
2385         * css/DeprecatedStyleBuilder.cpp:
2386         (WebCore::ApplyPropertyComputeLength::applyValue):
2387         Calculating the border values which has been specified
2388         in vh/vw units.The vh/vw units are calcultated as percent
2389         of viewport height and viewport width respectively.
2390
2391 2013-09-12  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2392
2393         [Coordinated Graphics] Fix the build on MacOS 10.9
2394         https://bugs.webkit.org/show_bug.cgi?id=121225
2395
2396         Reviewed by Darin Adler.
2397
2398         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
2399
2400 2013-09-12  Mark Lam  <mark.lam@apple.com>
2401
2402         Change debug hooks to pass sourceID and position info via the DebuggerCallFrame.
2403         https://bugs.webkit.org/show_bug.cgi?id=121214.
2404
2405         Reviewed by Geoffrey Garen.
2406
2407         No new tests.
2408
2409         Also changed the Inspector's JavaScriptCallFrame to get the sourceID and
2410         position info from its DebuggerCallFrame instead of caching those values.
2411
2412         * bindings/js/JavaScriptCallFrame.cpp:
2413         (WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
2414         * bindings/js/JavaScriptCallFrame.h:
2415         (WebCore::JavaScriptCallFrame::create):
2416         (WebCore::JavaScriptCallFrame::invalidate):
2417         (WebCore::JavaScriptCallFrame::sourceID):
2418         (WebCore::JavaScriptCallFrame::position):
2419         (WebCore::JavaScriptCallFrame::line):
2420         (WebCore::JavaScriptCallFrame::column):
2421         (WebCore::JavaScriptCallFrame::update):
2422         * bindings/js/ScriptDebugServer.cpp:
2423         (WebCore::ScriptDebugServer::createCallFrame):
2424         (WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
2425         (WebCore::ScriptDebugServer::callEvent):
2426         (WebCore::ScriptDebugServer::atStatement):
2427         (WebCore::ScriptDebugServer::returnEvent):
2428         (WebCore::ScriptDebugServer::exception):
2429         (WebCore::ScriptDebugServer::willExecuteProgram):
2430         (WebCore::ScriptDebugServer::didExecuteProgram):
2431         (WebCore::ScriptDebugServer::didReachBreakpoint):
2432         * bindings/js/ScriptDebugServer.h:
2433         * bindings/js/WorkerScriptDebugServer.cpp:
2434         (WebCore::WorkerScriptDebugServer::willExecuteProgram):
2435         * bindings/js/WorkerScriptDebugServer.h:
2436
2437 2013-09-12  peavo@outlook.com  <peavo@outlook.com>
2438
2439         [WinCairo] Compile errors, missing include.
2440         https://bugs.webkit.org/show_bug.cgi?id=121222
2441
2442         Reviewed by Brent Fulgham.
2443
2444         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Include required header.
2445         * platform/win/DragImageCairoWin.cpp: Include required header.
2446
2447 2013-09-12  Vivek Galatage  <vivek.vg@samsung.com>
2448
2449         XMLSerializer.serializeToString() should throw exception for invalid node value.
2450         https://bugs.webkit.org/show_bug.cgi?id=121209
2451
2452         Reviewed by Darin Adler.
2453
2454         FF and Opera 12 (pre blink/webkit) throw exception in case the node value is invalid.
2455         Blink sends an empty string as the result of serializeToString operation with invalid node.
2456         We should match with other browsers for throwing it as an exception.
2457
2458         Blink review URL: https://chromiumcodereview.appspot.com/23532055/
2459
2460         Test: fast/dom/xmlserializer-serialize-to-string-exception.html
2461
2462         * xml/XMLSerializer.cpp:
2463         (WebCore::XMLSerializer::serializeToString):
2464
2465 2013-09-12  Zalan Bujtas  <zalan@apple.com>
2466
2467         Crash in ScrollingStateStickyNode::updateConstraints
2468         https://bugs.webkit.org/show_bug.cgi?id=119638
2469
2470         Reviewed by Simon Fraser.
2471
2472         Ensure when a scrolling state node is removed from the state tree,
2473         we remove both the current node and all its children from the
2474         associated m_stateNodeMap lookup table.
2475
2476         Test: fast/css/sticky/multiple-layers-sticky-crash.html
2477
2478         * page/scrolling/ScrollingStateNode.cpp:
2479         (WebCore::ScrollingStateNode::removeChild):
2480         (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
2481         * page/scrolling/ScrollingStateNode.h:
2482
2483 2013-09-12  Zalan Bujtas  <zalan@apple.com>
2484
2485         REGRESSION (r132516): Javascript menu text incorrectly disappearing and reappearing
2486         https://bugs.webkit.org/show_bug.cgi?id=101047
2487
2488         Reviewed by Simon Fraser.
2489
2490         Compositing layers keep track of ancestors' clipping by constructing the RenderLayerBacking::m_ancestorClippingLayer.
2491         It helps setting up the proper clipping context for the corresponding graphics layer.
2492         When a RenderObject's clipping style changes, it needs to propagate this change not only
2493         to the associated RenderLayer, but also to the descendants', if applicable.
2494         Before r132516, it was mainly covered by initiating full style recalcs, which ensured that
2495         style recalc on the descendant rendering tree took care of creating/destroying
2496         RenderLayerBacking::m_ancestorClippingLayer at every compositing layer node. Without the full
2497         recalc, the clipping of the compositing render layers and the corresponding render subtrees can get out of sync.
2498         This patch updates the clipping context on the descendant subtree, when the clipping behaviour
2499         changes on a render node.
2500
2501         Tests: compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html
2502                compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html
2503
2504         * rendering/RenderLayer.cpp:
2505         (WebCore::RenderLayer::updateDescendantClippingContext):
2506         (WebCore::RenderLayer::styleChanged):
2507         * rendering/RenderLayer.h:
2508         * rendering/RenderLayerBacking.cpp:
2509         (WebCore::RenderLayerBacking::~RenderLayerBacking):
2510         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2511         (WebCore::RenderLayerBacking::updateAncestorClippingLayer):
2512         (WebCore::RenderLayerBacking::updateDescendantClippingLayer):
2513         * rendering/RenderLayerBacking.h:
2514
2515 2013-09-12  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2516
2517         Remove home-brewed nullptr
2518         https://bugs.webkit.org/show_bug.cgi?id=119624
2519
2520         Reviewed by Anders Carlsson.
2521
2522         The standard C++11 nullptr and std::nullptr_t type should be used now.
2523
2524         * bindings/js/JSDOMBinding.h:
2525
2526 2013-09-12  Samuel White  <samuel_white@apple.com>
2527
2528         <meter> element text value exposed as AXTitle; should be exposing AXValueDescription
2529         https://bugs.webkit.org/show_bug.cgi?id=117651
2530
2531         Reviewed by Mario Sanchez Prada.
2532
2533         No new tests, updated accessibility/meter-element to handle platform specific output.
2534
2535         * accessibility/AccessibilityObject.cpp:
2536         (WebCore::AccessibilityObject::isMeter):
2537         * accessibility/AccessibilityObject.h:
2538         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2539         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2540
2541 2013-09-12  Santosh Mahto  <santosh.ma@samsung.com>
2542
2543         class WeekInputType invokes wrong constructor
2544         https://bugs.webkit.org/show_bug.cgi?id=120768
2545
2546         Reviewed by Andreas Kling.
2547
2548         Correcting wrong constuctor invocation.
2549
2550         * html/WeekInputType.h:
2551         (WebCore::WeekInputType::WeekInputType):
2552
2553 2013-09-12  Samuel White  <samuel_white@apple.com>
2554
2555         AX: Self-referencing aria-labelledby only uses contents.
2556         https://bugs.webkit.org/show_bug.cgi?id=120814
2557
2558         Reviewed by Mario Sanchez Prada.
2559
2560         Implemented additional 'Text Alternative Computation' steps documented at:
2561         http://www.w3.org/WAI/PF/aria/complete#textalternativecomputation. This allows us to remove
2562         our raw text node iteration that was previously forcing us to do our computation incorrectly.
2563         Element content is now sourced using textUnderElement (step 2C of the computation).
2564
2565         Test: accessibility/self-referencing-aria-labelledby.html
2566
2567         * accessibility/AccessibilityNodeObject.cpp:
2568         (WebCore::accessibleNameForNode):
2569         (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
2570
2571 2013-09-12  Commit Queue  <commit-queue@webkit.org>
2572
2573         Unreviewed, rolling out r155597.
2574         http://trac.webkit.org/changeset/155597
2575         https://bugs.webkit.org/show_bug.cgi?id=121220
2576
2577         broke windows build because there's no ews :( (Requested by
2578         thorton on #webkit).
2579
2580         * WebCore.exp.in:
2581         * platform/graphics/BitmapImage.cpp:
2582         (WebCore::BitmapImage::isBitmapImage):
2583         * platform/graphics/BitmapImage.h:
2584         (WebCore::BitmapImage::create):
2585         * platform/graphics/CrossfadeGeneratedImage.cpp:
2586         (WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
2587         (WebCore::CrossfadeGeneratedImage::drawPattern):
2588         * platform/graphics/CrossfadeGeneratedImage.h:
2589         (WebCore::CrossfadeGeneratedImage::setContainerSize):
2590         (WebCore::CrossfadeGeneratedImage::usesContainerSize):
2591         (WebCore::CrossfadeGeneratedImage::hasRelativeWidth):
2592         (WebCore::CrossfadeGeneratedImage::hasRelativeHeight):
2593         (WebCore::CrossfadeGeneratedImage::size):
2594         * platform/graphics/GeneratedImage.h:
2595         (WebCore::GeneratedImage::hasSingleSecurityOrigin):
2596         (WebCore::GeneratedImage::setContainerSize):
2597         (WebCore::GeneratedImage::usesContainerSize):
2598         (WebCore::GeneratedImage::hasRelativeWidth):
2599         (WebCore::GeneratedImage::hasRelativeHeight):
2600         (WebCore::GeneratedImage::size):
2601         (WebCore::GeneratedImage::destroyDecodedData):
2602         (WebCore::GeneratedImage::decodedSize):
2603         * platform/graphics/GeneratorGeneratedImage.cpp:
2604         (WebCore::GeneratorGeneratedImage::draw):
2605         (WebCore::GeneratorGeneratedImage::drawPattern):
2606         * platform/graphics/GeneratorGeneratedImage.h:
2607         (WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
2608         * svg/graphics/SVGImage.h:
2609         (WebCore::SVGImage::isSVGImage):
2610         (WebCore::SVGImage::usesContainerSize):
2611         (WebCore::SVGImage::destroyDecodedData):
2612         (WebCore::SVGImage::decodedSize):
2613         * svg/graphics/SVGImageForContainer.h:
2614         (WebCore::SVGImageForContainer::destroyDecodedData):
2615         (WebCore::SVGImageForContainer::decodedSize):
2616
2617 2013-09-12  Andreas Kling  <akling@apple.com>
2618
2619         RenderWidget elements are always HTMLFrameOwnerElement subclasses.
2620         <https://webkit.org/b/121217>
2621
2622         Reviewed by Antti Koivisto.
2623
2624         Make RenderWidget constructor take HTMLFrameOwnerElement* and update subclasses
2625         with even tighter types where possible.
2626
2627         Also added RenderWidget::frameOwnerElement() and deleted element().
2628         Removed a handful of unnecessary type checks that were exposed by this.
2629
2630 2013-09-11  Tim Horton  <timothy_horton@apple.com>
2631
2632         Apply OVERRIDE and FINAL to Image subclasses and clean them up
2633         https://bugs.webkit.org/show_bug.cgi?id=121086
2634
2635         Reviewed by Alexey Proskuryakov.
2636
2637         Everything other than the copious application of OVERRIDE and FINAL
2638         is explicitly called out below.
2639
2640         * WebCore.exp.in:
2641         Export the correct version of getCGImageRef for use by WebKit2.
2642
2643         * platform/graphics/BitmapImage.cpp:
2644         * platform/graphics/BitmapImage.h:
2645         Drive-by inline isBitmapImage.
2646         Move create(HBITMAP) to be near the other create() functions.
2647         Move all of the members and quite a few functions from protected to private.
2648         Devirtualize frameCount().
2649         Move notSolidColor() near the other solid color functions.
2650
2651         * platform/graphics/CrossfadeGeneratedImage.cpp:
2652         (WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
2653         (WebCore::CrossfadeGeneratedImage::drawPattern):
2654         * platform/graphics/GeneratorGeneratedImage.cpp:
2655         (WebCore::GeneratorGeneratedImage::draw):
2656         (WebCore::GeneratorGeneratedImage::drawPattern):
2657         Use size() and setContainerSize() instead of directly accessing a
2658         superclass' (now private, previously protected) members.
2659
2660         * platform/graphics/CrossfadeGeneratedImage.h:
2661         * platform/graphics/GeneratedImage.h:
2662         Make m_size private, I don't think we do protected members.
2663         
2664         * platform/graphics/GeneratorGeneratedImage.h:
2665         Make all the members private.
2666
2667         * svg/graphics/SVGImage.h:
2668         * svg/graphics/SVGImageForContainer.h:
2669
2670 2013-09-11  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
2671
2672         Canvas fillText and measureText handle ideographic spaces differently
2673         https://bugs.webkit.org/show_bug.cgi?id=108881
2674
2675         Reviewed by Darin Adler.
2676
2677         According to spec for text preparation algorithm
2678         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm
2679         all the space characters mentioned in the spec
2680         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character
2681         should be replaced by U+0020 space character.
2682         The canvas functions fillText and measureText should run the text preparation algorithm.
2683         This patch modifies the canvas functions drawTextInternal and measureText to conform to the above spec.
2684
2685         Tests: fast/canvas/canvas-measureText-ideographicSpace.html
2686
2687         * html/canvas/CanvasRenderingContext2D.cpp:
2688         (WebCore::shouldSpaceBeReplaced):
2689         (WebCore::replaceCharacterInString):
2690         (WebCore::CanvasRenderingContext2D::measureText):
2691         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2692
2693 2013-09-11  Andreas Kling  <akling@apple.com>
2694
2695         Fix Windows build.
2696
2697         * rendering/RenderingAllInOne.cpp:
2698
2699 2013-09-11  Andreas Kling  <akling@apple.com>
2700
2701         Merge RenderPart into RenderWidget.
2702         <https://webkit.org/b/121200>
2703
2704         Reviewed by Anders Carlsson.
2705
2706         Remove the RenderPart class and move its functionality into RenderWidget.
2707         It was acting as a pointless extra layer between RenderWidget and renderers
2708         for embedded objects, frames and iframes.
2709
2710 2013-09-11  Geoffrey Garen  <ggaren@apple.com>
2711
2712         Removed some unused functions from the debugger interface
2713         https://bugs.webkit.org/show_bug.cgi?id=121194
2714
2715         Reviewed by Joseph Pecoraro.
2716
2717         We plan to use the "evaluate" API and debugger activation property access for all the features we need.
2718
2719         * inspector/JavaScriptCallFrame.idl: These are the interfaces I removed.
2720
2721         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
2722         * inspector/InjectedScript.cpp:
2723         * inspector/InjectedScript.h:
2724         * inspector/InjectedScriptSource.js:
2725         * inspector/Inspector.json:
2726         * inspector/InspectorDebuggerAgent.cpp:
2727         (WebCore::InspectorDebuggerAgent::setScriptSource):
2728         * inspector/InspectorDebuggerAgent.h:
2729         * inspector/JavaScriptCallFrame.idl:
2730         * inspector/front-end/RemoteObject.js:
2731         (WebInspector.RemoteObject.prototype.):
2732         (WebInspector.RemoteObject.prototype.setPropertyValue): These files are mechanical removals of code that used
2733         or implemented the interfaces I removed.
2734
2735 2013-09-11  Vivek Galatage  <vivek.vg@samsung.com>
2736
2737         DOMParser.parseFromString() should support creating HTML Document with mime-type text/html
2738         https://bugs.webkit.org/show_bug.cgi?id=120826
2739
2740         Reviewed by Darin Adler.
2741
2742         The specification http://domparsing.spec.whatwg.org/#the-domparser-interface for DOMParser.parseFromString()
2743         allows the document creation if the mimeType is one of the supported types:
2744         ["text/html", "text/xml", "application/xml", "application/xhtml+xml", "image/svg+xml"]
2745
2746         Also script elements get marked unexecutable and the contents of noscript get parsed as markup.
2747
2748         blink review URL: https://codereview.chromium.org/23903014/
2749
2750         Test: fast/dom/domparser-parsefromstring-mimetype-support.html
2751
2752         * xml/DOMParser.cpp:
2753         (WebCore::DOMParser::parseFromString):
2754
2755 2013-09-11  Hans Muller  <hmuller@adobe.com>
2756
2757         [CSS Shapes] Improve the performance of image valued shapes
2758         https://bugs.webkit.org/show_bug.cgi?id=120211
2759
2760         Reviewed by Alexandru Chiculita.
2761
2762         Replaced the implementation of RasterShapeIntervals with one based on the
2763         new ShapeInterval<int> class. This eliminates the dependency the Region class
2764         and delivers a 10X layout speedup for large image valued shapes.
2765
2766         This a just an implementation refactoring, no new tests were needed.
2767
2768         * rendering/shapes/RasterShape.cpp:
2769         (WebCore::RasterShapeIntervals::appendInterval): Renamed this method, it was called addInterval().
2770         (WebCore::shapeIntervalsContain):
2771         (WebCore::RasterShapeIntervals::contains):
2772         (WebCore::RasterShapeIntervals::getIntervalsInLine):
2773         (WebCore::compareX1):
2774         (WebCore::RasterShapeIntervals::firstIncludedIntervalY):
2775         (WebCore::RasterShapeIntervals::getIncludedIntervals):
2776         (WebCore::RasterShapeIntervals::getExcludedIntervals):
2777         (WebCore::RasterShape::getExcludedIntervals):
2778         (WebCore::RasterShape::getIncludedIntervals):
2779         * rendering/shapes/RasterShape.h:
2780         (WebCore::RasterShapeIntervals::RasterShapeIntervals): The constructor now takes a size argument which is used to allocate IntShapeIntervals storage.
2781         (WebCore::RasterShapeIntervals::size):
2782         (WebCore::RasterShapeIntervals::bounds):
2783         (WebCore::RasterShapeIntervals::isEmpty):
2784         (WebCore::RasterShapeIntervals::getIntervals):
2785         * rendering/shapes/Shape.cpp:
2786         (WebCore::Shape::createShape): Use appendInterval() instead of addInterval() (see above) and the new RasterShapeIntervals constructor.
2787
2788 2013-09-11  Eric Carlson  <eric.carlson@apple.com>
2789
2790         [MediaStream API] Updating NavigatorUserMediaError to match the spec
2791         https://bugs.webkit.org/show_bug.cgi?id=120880
2792
2793         Reviewed by Darin Adler.
2794         
2795         Merge https://chromium.googlesource.com/chromium/blink/+/f07305e49ddebaa166f5dee514bcc881a8efd341
2796         by Tommy Widenflycht.
2797
2798         The Blink change did not have any test changes because they don't appear to have any tests 
2799         for NavigatorUserMediaError. I can't add tests now because the MediaStream feature isn't enabled 
2800         yet, so https://bugs.webkit.org/show_bug.cgi?id=121182 tracks adding tests.
2801
2802         * Modules/mediastream/NavigatorUserMediaError.h:
2803         (WebCore::NavigatorUserMediaError::create):
2804         (WebCore::NavigatorUserMediaError::name):
2805         (WebCore::NavigatorUserMediaError::message):
2806         (WebCore::NavigatorUserMediaError::constraintName):
2807         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
2808         * Modules/mediastream/NavigatorUserMediaError.idl:
2809         * Modules/mediastream/UserMediaRequest.cpp:
2810         (WebCore::UserMediaRequest::fail):
2811         (WebCore::UserMediaRequest::failConstraint):
2812         * Modules/mediastream/UserMediaRequest.h:
2813
2814 2013-09-11  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2815
2816         MediaStream API: Remove LocalMediaStream
2817         https://bugs.webkit.org/show_bug.cgi?id=120875
2818
2819         blink merge: https://chromium.googlesource.com/chromium/blink/+/81643ee3fe048a64fa8931132e1294fa2c8e821a
2820
2821         Reviewed by Eric Carlson.
2822
2823         Existing tests were updated.
2824
2825         * CMakeLists.txt:
2826         * DerivedSources.make:
2827         * GNUmakefile.list.am:
2828         * Modules/mediastream/LocalMediaStream.cpp: Removed.
2829         * Modules/mediastream/LocalMediaStream.h: Removed.
2830         * Modules/mediastream/LocalMediaStream.idl: Removed.
2831         * Modules/mediastream/MediaStream.cpp:
2832         (WebCore::MediaStream::stop):
2833         * Modules/mediastream/MediaStream.h:
2834         * Modules/mediastream/MediaStream.idl:
2835         * Modules/mediastream/NavigatorUserMediaSuccessCallback.h:
2836         * Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
2837         * Modules/mediastream/UserMediaRequest.cpp:
2838         (WebCore::UserMediaRequest::succeed):
2839         * Modules/mediastream/UserMediaRequest.h:
2840         * Modules/webaudio/AudioContext.cpp:
2841         (WebCore::AudioContext::createMediaStreamSource):
2842         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2843         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
2844         * WebCore.xcodeproj/project.pbxproj:
2845         * dom/EventTarget.h:
2846         * dom/EventTargetFactory.in:
2847         * platform/mediastream/MediaStreamDescriptor.h:
2848
2849 2013-09-11  Timothy Hatcher  <timothy@apple.com>
2850
2851         Remove PlatformInstrumentation since we don't show decode or resize in the new Web Inspector
2852         https://bugs.webkit.org/show_bug.cgi?id=121181
2853
2854         Reviewed by Joseph Pecoraro.
2855
2856         * CMakeLists.txt:
2857         * GNUmakefile.list.am:
2858         * Target.pri:
2859         * WebCore.order:
2860         * WebCore.vcxproj/WebCore.vcxproj:
2861         * WebCore.vcxproj/WebCore.vcxproj.filters:
2862         * WebCore.xcodeproj/project.pbxproj:
2863         * inspector/InspectorTimelineAgent.cpp:
2864         (WebCore::InspectorTimelineAgent::willPaint):
2865         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
2866         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2867         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2868         (WebCore::InspectorTimelineAgent::clearRecordStack):
2869         * inspector/InspectorTimelineAgent.h:
2870         * platform/PlatformInstrumentation.cpp: Removed.
2871         * platform/PlatformInstrumentation.h: Removed.
2872         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
2873         (WebCore::BMPImageDecoder::frameBufferAtIndex):
2874         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2875         (WebCore::GIFImageDecoder::frameBufferAtIndex):
2876         * platform/image-decoders/ico/ICOImageDecoder.cpp:
2877         (WebCore::ICOImageDecoder::frameBufferAtIndex):
2878         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2879         (WebCore::JPEGImageDecoder::frameBufferAtIndex):
2880         * platform/image-decoders/png/PNGImageDecoder.cpp:
2881         (WebCore::PNGImageDecoder::frameBufferAtIndex):
2882         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
2883         (WebCore::WEBPImageDecoder::frameBufferAtIndex):
2884
2885 2013-09-11  Brent Fulgham  <bfulgham@apple.com>
2886
2887         [Windows] Avoid converting from IntSize->SIZE->IntSize.
2888         https://bugs.webkit.org/show_bug.cgi?id=121180
2889
2890         Reviewed by Anders Carlsson.
2891
2892         * platform/graphics/BitmapImage.h: Take const IntSize* as
2893         argument, rather than LPSIZE.
2894         * platform/graphics/Image.h: Ditto.
2895         (WebCore::Image::getHBITMAPOfSize):
2896         * platform/graphics/win/ImageCGWin.cpp:
2897         (WebCore::BitmapImage::getHBITMAPOfSize): Use passed-in
2898         IntSize, rather than converting from SIZE.
2899         * platform/graphics/win/ImageCairoWin.cpp:
2900         (WebCore::BitmapImage::getHBITMAPOfSize): Ditto.
2901
2902 2013-09-11  Zoltan Horvath  <zoltan@webkit.org>
2903
2904         Unreviewed debug build fix after r155567.
2905
2906         * rendering/LineWidth.cpp:
2907         (WebCore::LineWidth::LineWidth):
2908
2909 2013-09-11  Zoltan Horvath  <zoltan@webkit.org>
2910
2911         Move LineWidth out of RenderBlockLineLayout
2912         https://bugs.webkit.org/show_bug.cgi?id=121107
2913
2914         Reviewed by David Hyatt.
2915
2916         Move LineWidth class and related code into LineWidth.{h,cpp}.
2917
2918         No new tests, no behavior change.
2919
2920         * CMakeLists.txt:
2921         * GNUmakefile.list.am:
2922         * Target.pri:
2923         * WebCore.vcxproj/WebCore.vcxproj:
2924         * WebCore.xcodeproj/project.pbxproj:
2925         * rendering/LineWidth.cpp: Added.
2926         (WebCore::LineWidth::applyOverhang):
2927         (WebCore::LineWidth::fitBelowFloats):
2928         * rendering/LineWidth.h: Added.
2929         (WebCore::logicalHeightForLine):
2930         (WebCore::LineWidth::LineWidth):
2931         (WebCore::LineWidth::fitsOnLine):
2932         (WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
2933         (WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
2934         (WebCore::LineWidth::currentWidth):
2935         (WebCore::LineWidth::uncommittedWidth):
2936         (WebCore::LineWidth::committedWidth):
2937         (WebCore::LineWidth::availableWidth):
2938         (WebCore::LineWidth::addUncommittedWidth):
2939         (WebCore::LineWidth::commit):
2940         (WebCore::LineWidth::setTrailingWhitespaceWidth):
2941         (WebCore::LineWidth::shouldIndentText):
2942         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
2943         (WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
2944         (WebCore::LineWidth::updateAvailableWidth):
2945         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2946         * rendering/RenderBlockLineLayout.cpp:
2947
2948 2013-09-11  Ryosuke Niwa  <rniwa@webkit.org>
2949
2950         HTMLEntityTable could use char to reduce binary size
2951         https://bugs.webkit.org/show_bug.cgi?id=121176
2952
2953         Reviewed by Anders Carlsson.
2954
2955         Use LChar instead.
2956
2957         * html/parser/HTMLEntityParser.cpp:
2958         (WebCore::HTMLEntityParser::consumeNamedEntity):
2959         * html/parser/HTMLEntityTable.h:
2960         (WebCore::HTMLEntityTableEntry::lastCharacter):
2961         * html/parser/create-html-entity-table:
2962
2963 2013-09-11  Brent Fulgham  <bfulgham@apple.com>
2964
2965         [Windows] Revise GDI Create Functions to use GDIObject Smart Pointer.
2966         https://bugs.webkit.org/show_bug.cgi?id=121100
2967
2968         Reviewed by Anders Carlsson.
2969
2970         * platform/graphics/FontPlatformData.h: Use GDIObject instead of bare pointer.
2971         * platform/graphics/win/FontCacheWin.cpp:
2972         (WebCore::createGDIFont): No longer need to leak the pointer; use move semantic
2973         to pass ownership to FontPlatformData.
2974         (WebCore::FontCache::createFontPlatformData):
2975         * platform/graphics/win/FontCustomPlatformData.cpp:
2976         (WebCore::FontCustomPlatformData::fontPlatformData): Use move operation.
2977         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2978         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
2979         * platform/graphics/win/FontPlatformDataCGWin.cpp:
2980         (WebCore::FontPlatformData::FontPlatformData): Ditto.
2981         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2982         (WebCore::FontPlatformData::FontPlatformData): Ditto.
2983         * platform/graphics/win/FontPlatformDataWin.cpp:
2984         (WebCore::FontPlatformData::FontPlatformData): Ditto.
2985         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
2986         (WebCore::GlyphPage::fill): Use HWndDC smart pointer instead of bare HDC.
2987         * platform/graphics/win/SimpleFontDataWin.cpp:
2988         (WebCore::SimpleFontData::platformCreateScaledFontData): Use move operation.
2989         * platform/win/DragImageCGWin.cpp:
2990         (WebCore::allocImage): Change to use GDIObject.
2991         (WebCore::scaleDragImage): Use smart pointers to avoid manual deallocs.
2992         (WebCore::createDragImageFromImage): Ditto.
2993         * platform/win/DragImageCairoWin.cpp:
2994         (WebCore::allocImage): Change to use GDIObject.
2995         (WebCore::scaleDragImage): Use smart pointers to avoid manual deallocs.
2996         (WebCore::createDragImageFromImage): Ditto.
2997         * platform/win/DragImageWin.cpp:
2998         (WebCore::createDragImageForLink): Update for GDIObject.
2999         * platform/win/PopupMenuWin.cpp:
3000         (WebCore::PopupMenuWin::PopupMenuWin): Switch to GDIObject.
3001         (WebCore::PopupMenuWin::~PopupMenuWin): Remove uneeded deallocs.
3002         (WebCore::PopupMenuWin::paint): Update for GDIObject.
3003         * platform/win/PopupMenuWin.h: Use smart pointers instead of bare GDI objects.
3004
3005 2013-09-11  Patrick Gansterer  <paroga@webkit.org>
3006
3007         Fix animations with !USE(ACCELERATED_COMPOSITING) after r147792.
3008         https://bugs.webkit.org/show_bug.cgi?id=121159
3009
3010         Reviewed by Simon Fraser.
3011
3012         CSSPropertyAnimation::blendProperties() is available always
3013         and needs to be called to make the animations work.
3014
3015         * page/animation/ImplicitAnimation.cpp:
3016         (WebCore::ImplicitAnimation::animate):
3017         * page/animation/KeyframeAnimation.cpp:
3018         (WebCore::KeyframeAnimation::animate):
3019
3020 2013-09-11  David Hyatt  <hyatt@apple.com>
3021
3022         Move all collapsing margin code out of RenderBlock and into RenderBlockFlow.
3023         https://bugs.webkit.org/show_bug.cgi?id=121049
3024
3025         Reviewed by Dean Jackson.
3026
3027         This patch begins the migration of the rare data struct of RenderBlock into
3028         RenderBlockFlow. During this process we will temporarily have rare data structs
3029         in both places, but ultimately all of the members are going to move down into
3030         RenderBlockFlow, and if any don't, they will get forced into a hash.
3031         
3032         For this patch, the margin information is being shifted out of RenderBlock and into
3033         RenderBlockFlow. Any functions that refer to MarginValues or to MarginInfo also got
3034         moved down into RenderBlockFlow. Most of block child layout is now in RenderBlockFlow
3035         after this patch.
3036         
3037         Note that in many cases the code didn't simply move. There is some type tightening
3038         that happened as well, i.e., places that look for RenderBlock can now look for
3039         RenderBlockFlow instead and let RenderBlock execute the base RenderBox functions.
3040
3041         * rendering/RenderBlock.cpp:
3042         (WebCore::RenderBlock::RenderBlock):
3043         (WebCore::RenderBlock::setPaginationStrut):
3044         (WebCore::RenderBlock::setPageLogicalOffset):
3045         (WebCore::RenderBlock::setBreakAtLineToAvoidWidow):
3046         * rendering/RenderBlock.h:
3047         (WebCore::RenderBlock::setLineGridBox):
3048         (WebCore::RenderBlock::setShapeInsideInfo):
3049         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
3050         * rendering/RenderBlockFlow.cpp:
3051         (WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
3052         (WebCore::RenderBlockFlow::RenderBlockFlow):
3053         (WebCore::RenderBlockFlow::layoutBlockChild):
3054         (WebCore::RenderBlockFlow::adjustPositionedBlock):
3055         (WebCore::RenderBlockFlow::adjustFloatingBlock):
3056         (WebCore::RenderBlockFlow::marginValuesForChild):
3057         (WebCore::RenderBlockFlow::collapseMargins):
3058         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
3059         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
3060         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
3061         (WebCore::RenderBlockFlow::setCollapsedBottomMargin):
3062         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
3063         (WebCore::RenderBlockFlow::setMaxMarginBeforeValues):
3064         (WebCore::RenderBlockFlow::setMaxMarginAfterValues):
3065         (WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
3066         (WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
3067         (WebCore::RenderBlockFlow::mustDiscardMarginBefore):
3068         (WebCore::RenderBlockFlow::mustDiscardMarginAfter):
3069         (WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild):
3070         (WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild):
3071         (WebCore::RenderBlockFlow::mustSeparateMarginBeforeForChild):
3072         (WebCore::RenderBlockFlow::mustSeparateMarginAfterForChild):
3073         (WebCore::inNormalFlow):
3074         (WebCore::RenderBlockFlow::applyBeforeBreak):
3075         (WebCore::RenderBlockFlow::applyAfterBreak):
3076         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
3077         * rendering/RenderBlockFlow.h:
3078         (WebCore::RenderBlockFlow::MarginValues::MarginValues):
3079         (WebCore::RenderBlockFlow::MarginValues::positiveMarginBefore):
3080         (WebCore::RenderBlockFlow::MarginValues::negativeMarginBefore):
3081         (WebCore::RenderBlockFlow::MarginValues::positiveMarginAfter):
3082         (WebCore::RenderBlockFlow::MarginValues::negativeMarginAfter):
3083         (WebCore::RenderBlockFlow::MarginValues::setPositiveMarginBefore):
3084         (WebCore::RenderBlockFlow::MarginValues::setNegativeMarginBefore):
3085         (WebCore::RenderBlockFlow::MarginValues::setPositiveMarginAfter):
3086         (WebCore::RenderBlockFlow::MarginValues::setNegativeMarginAfter):
3087         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
3088         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::positiveMarginBeforeDefault):
3089         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::negativeMarginBeforeDefault):
3090         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::positiveMarginAfterDefault):
3091         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::negativeMarginAfterDefault):
3092         (WebCore::RenderBlockFlow::MarginInfo::setAtBeforeSideOfBlock):
3093         (WebCore::RenderBlockFlow::MarginInfo::setAtAfterSideOfBlock):
3094         (WebCore::RenderBlockFlow::MarginInfo::clearMargin):
3095         (WebCore::RenderBlockFlow::MarginInfo::setHasMarginBeforeQuirk):
3096         (WebCore::RenderBlockFlow::MarginInfo::setHasMarginAfterQuirk):
3097         (WebCore::RenderBlockFlow::MarginInfo::setDeterminedMarginBeforeQuirk):
3098         (WebCore::RenderBlockFlow::MarginInfo::setPositiveMargin):
3099         (WebCore::RenderBlockFlow::MarginInfo::setNegativeMargin):
3100         (WebCore::RenderBlockFlow::MarginInfo::setPositiveMarginIfLarger):
3101         (WebCore::RenderBlockFlow::MarginInfo::setNegativeMarginIfLarger):
3102         (WebCore::RenderBlockFlow::MarginInfo::setMargin):
3103         (WebCore::RenderBlockFlow::MarginInfo::setCanCollapseMarginAfterWithChildren):
3104         (WebCore::RenderBlockFlow::MarginInfo::setDiscardMargin):
3105         (WebCore::RenderBlockFlow::MarginInfo::atBeforeSideOfBlock):
3106         (WebCore::RenderBlockFlow::MarginInfo::canCollapseWithMarginBefore):
3107         (WebCore::RenderBlockFlow::MarginInfo::canCollapseWithMarginAfter):
3108         (WebCore::RenderBlockFlow::MarginInfo::canCollapseMarginBeforeWithChildren):
3109         (WebCore::RenderBlockFlow::MarginInfo::canCollapseMarginAfterWithChildren):
3110         (WebCore::RenderBlockFlow::MarginInfo::quirkContainer):
3111         (WebCore::RenderBlockFlow::MarginInfo::determinedMarginBeforeQuirk):
3112         (WebCore::RenderBlockFlow::MarginInfo::hasMarginBeforeQuirk):
3113         (WebCore::RenderBlockFlow::MarginInfo::hasMarginAfterQuirk):
3114         (WebCore::RenderBlockFlow::MarginInfo::positiveMargin):
3115         (WebCore::RenderBlockFlow::MarginInfo::negativeMargin):
3116         (WebCore::RenderBlockFlow::MarginInfo::discardMargin):
3117         (WebCore::RenderBlockFlow::MarginInfo::margin):
3118         (WebCore::RenderBlockFlow::maxPositiveMarginBefore):
3119         (WebCore::RenderBlockFlow::maxNegativeMarginBefore):
3120         (WebCore::RenderBlockFlow::maxPositiveMarginAfter):
3121         (WebCore::RenderBlockFlow::maxNegativeMarginAfter):
3122         (WebCore::RenderBlockFlow::initMaxMarginValues):
3123         * rendering/RenderDeprecatedFlexibleBox.cpp:
3124         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
3125         * rendering/RenderTable.cpp:
3126         (WebCore::RenderTable::layout):
3127
3128 2013-09-11  Myles C. Maxfield  <mmaxfield@apple.com>
3129
3130         Fix nested unicode-bidi: isolate
3131         https://bugs.webkit.org/show_bug.cgi?id=120504
3132
3133         Reviewed by Darin Adler.
3134
3135         When we have a nested isolate renderer if the outer isolate has a text
3136         and this text is not the first child, the isolated chain is not
3137         rendered correctly. This happens because constructBidiRunsForSegment
3138         uses always the first inner isolated renderer as isolated inline
3139         container. This patch fixes the behavior described changing
3140         containingIsolate to find the right isolated container.
3141
3142         Merged from Blink: https://chromium.googlesource.com/chromium/blink/+/840a57050eade39dd04dde0c6603e129b783151c
3143
3144         Tests: fast/text/international/unicode-bidi-isolate-nested-first-child-text.html
3145                fast/text/international/unicode-bidi-isolate-nested-simple.html
3146
3147         * rendering/InlineIterator.h:
3148         (WebCore::containingIsolate):
3149         * rendering/RenderBlockLineLayout.cpp:
3150         (WebCore::constructBidiRunsForSegment):
3151
3152 2013-09-11  Alexey Proskuryakov  <ap@apple.com>
3153
3154         https://bugs.webkit.org/show_bug.cgi?id=121169
3155         media/track/track-cue-rendering-vertical.html is flaky on Mac
3156
3157         Reviewed by Eric Carlson.
3158
3159         * html/shadow/MediaControlElements.cpp:
3160         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Added a FIXME.
3161
3162 2013-09-11  Anders Carlsson  <andersca@apple.com>
3163
3164         Stop using deleteAllValues in SVG code
3165         https://bugs.webkit.org/show_bug.cgi?id=121172
3166
3167         Reviewed by Antti Koivisto.
3168
3169         Use OwnPtr for values instead.
3170
3171         * rendering/svg/RenderSVGResourceClipper.cpp:
3172         (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper):
3173         (WebCore::RenderSVGResourceClipper::removeAllClientsFromCache):
3174         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
3175         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
3176         * rendering/svg/RenderSVGResourceClipper.h:
3177         * rendering/svg/RenderSVGResourceFilter.cpp:
3178         (WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter):
3179         (WebCore::RenderSVGResourceFilter::removeAllClientsFromCache):
3180         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
3181         (WebCore::RenderSVGResourceFilter::applyResource):
3182         (WebCore::RenderSVGResourceFilter::postApplyResource):
3183         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
3184         * rendering/svg/RenderSVGResourceFilter.h:
3185         * rendering/svg/RenderSVGResourceMasker.cpp:
3186         (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker):
3187         (WebCore::RenderSVGResourceMasker::removeAllClientsFromCache):
3188         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
3189         (WebCore::RenderSVGResourceMasker::applyResource):
3190         * rendering/svg/RenderSVGResourceMasker.h:
3191
3192 2013-09-11  Ryosuke Niwa  <rniwa@webkit.org>
3193
3194         Make the table static const.
3195
3196         * css/makeprop.pl:
3197
3198 2013-09-11  Timothy Hatcher  <timothy@apple.com>
3199
3200         Remove TimelineTraceEventProcessor since no current ports use it
3201         https://bugs.webkit.org/show_bug.cgi?id=121171
3202
3203         Reviewed by Joseph Pecoraro.
3204
3205         * CMakeLists.txt:
3206         * GNUmakefile.list.am:
3207         * Target.pri:
3208         * WebCore.vcxproj/WebCore.vcxproj:
3209         * WebCore.vcxproj/WebCore.vcxproj.filters:
3210         * WebCore.xcodeproj/project.pbxproj:
3211         * inspector/InspectorAllInOne.cpp:
3212         * inspector/InspectorClient.h:
3213         * inspector/InspectorInstrumentation.cpp:
3214         * inspector/InspectorInstrumentation.h:
3215         * inspector/InspectorTimelineAgent.cpp:
3216         (WebCore::InspectorTimelineAgent::start):
3217         (WebCore::InspectorTimelineAgent::stop):
3218         * inspector/InspectorTimelineAgent.h:
3219         * inspector/TimelineTraceEventProcessor.cpp: Removed.
3220         * inspector/TimelineTraceEventProcessor.h: Removed.
3221
3222 2013-09-11  Commit Queue  <commit-queue@webkit.org>
3223
3224         Unreviewed, rolling out r155519.
3225         http://trac.webkit.org/changeset/155519
3226         https://bugs.webkit.org/show_bug.cgi?id=121174
3227
3228         Included regression test fails, and an existing test started
3229         to crash (Requested by ap on #webkit).
3230
3231         * dom/Document.cpp:
3232         (WebCore::Document::hoveredElementDidDetach):
3233         * page/EventHandler.cpp:
3234         (WebCore::EventHandler::EventHandler):
3235         (WebCore::EventHandler::clear):
3236         (WebCore::EventHandler::handleMouseMoveEvent):
3237         (WebCore::EventHandler::scheduleHoverStateUpdate):
3238         (WebCore::EventHandler::hoverTimerFired):
3239         * page/EventHandler.h:
3240
3241 2013-09-11  Anders Carlsson  <andersca@apple.com>
3242
3243         Stop using deleteAllValues in SVG code
3244         https://bugs.webkit.org/show_bug.cgi?id=121172
3245
3246         Reviewed by Antti Koivisto.
3247
3248         Use OwnPtr for values instead.
3249
3250         * rendering/svg/RenderSVGResourceClipper.cpp:
3251         (WebCore::RenderSVGResourceClipper::~RenderSVGResourceClipper):
3252         (WebCore::RenderSVGResourceClipper::removeAllClientsFromCache):
3253         (WebCore::RenderSVGResourceClipper::removeClientFromCache):
3254         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
3255         * rendering/svg/RenderSVGResourceClipper.h:
3256         * rendering/svg/RenderSVGResourceFilter.cpp:
3257         (WebCore::RenderSVGResourceFilter::~RenderSVGResourceFilter):
3258         (WebCore::RenderSVGResourceFilter::removeAllClientsFromCache):
3259         (WebCore::RenderSVGResourceFilter::removeClientFromCache):
3260         (WebCore::RenderSVGResourceFilter::applyResource):
3261         (WebCore::RenderSVGResourceFilter::postApplyResource):
3262         (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged):
3263         * rendering/svg/RenderSVGResourceFilter.h:
3264         * rendering/svg/RenderSVGResourceMasker.cpp:
3265         (WebCore::RenderSVGResourceMasker::~RenderSVGResourceMasker):
3266         (WebCore::RenderSVGResourceMasker::removeAllClientsFromCache):
3267         (WebCore::RenderSVGResourceMasker::removeClientFromCache):
3268         (WebCore::RenderSVGResourceMasker::applyResource):
3269         * rendering/svg/RenderSVGResourceMasker.h:
3270
3271 2013-09-10  Simon Fraser  <simon.fraser@apple.com>
3272
3273         REGRESSION (143483): overflow:hidden doesn't quash big repaints from text-indent: -9999px
3274         https://bugs.webkit.org/show_bug.cgi?id=121137
3275
3276         Reviewed by Ryosuke Niwa.
3277         
3278         The change in r143483 made it so that negative text-indent gets added
3279         to visual oveflow even when we have overflow:hidden, which is really bad
3280         because it causes large repaints (and large layers) for a common-on-the-web
3281         pattern.
3282         
3283         Revert the change, and add a new test to make sure it doesn't regress.
3284         
3285         I can't reproduce the bug it was trying to fix with the change reverted.
3286
3287         Tests: compositing/geometry/negative-text-indent-with-overflow-hidden-layer.html
3288                fast/repaint/negative-text-indent-with-overflow-hidden.html
3289
3290         * rendering/RenderBlock.cpp:
3291         (WebCore::RenderBlock::computeOverflow):
3292
3293 2013-09-10  Simon Fraser  <simon.fraser@apple.com>
3294
3295         Optionally show visual and layout overflow rects in layer tree dumps
3296         https://bugs.webkit.org/show_bug.cgi?id=121135
3297
3298         Reviewed by Beth Dakin.
3299
3300         When calling showLayerTree() from the debugger, show overflow rects
3301         (visaul and layout) for renderers.
3302         
3303         Does not affect test output.
3304
3305         * rendering/RenderLayer.cpp:
3306         (showLayerTree): Pass the new flag to show overflow rects.
3307         * rendering/RenderTreeAsText.cpp:
3308         (WebCore::RenderTreeAsText::writeRenderObject): Print the rects.
3309         (WebCore::write): Don't force layout on subframes if the "dont' layout"
3310         flag is set.
3311         * rendering/RenderTreeAsText.h: New flag.
3312
3313 2013-09-11  Chris Fleizach  <cfleizach@apple.com>
3314
3315         AX: WebKit exposes AXTitleUIElement incorrectly on checkboxes and radio buttons
3316         https://bugs.webkit.org/show_bug.cgi?id=121039
3317
3318         Reviewed by Sam Weinig.
3319
3320         Stop hiding <label> elements for radio buttons and checkboxes (and using the text inside them for the AXTitle).
3321         Instead, expose the <label> element as the titleUIElement if appropriate for the input.
3322
3323         This implies:
3324            1) The web will no longer match MacOS behavior exactly (the text and the checkbox control are combined on MacOS into one element)
3325            2) But, the user will now be able to explore the <label> element which may include links or other important controls.
3326         I think sacrificing 1) here is a good tradeoff. The user will likely never know the difference in terms of output.
3327
3328         Test: platform/mac/accessibility/label-elements-exposed-as-title-ui-elements.html
3329
3330         * accessibility/AccessibilityNodeObject.cpp:
3331         (WebCore::AccessibilityNodeObject::titleElementText):
3332         (WebCore::AccessibilityNodeObject::title):
3333         * accessibility/AccessibilityRenderObject.cpp:
3334         (WebCore::AccessibilityRenderObject::hasTextAlternative):
3335         (WebCore::AccessibilityRenderObject::exposesTitleUIElement):
3336
3337 2013-09-11  Andreas Kling  <akling@apple.com>
3338
3339         Remove unnecessary Document::frame() null checks in rendererIsNeeded().
3340         <https://webkit.org/b/121166>
3341
3342         Reviewed by Anders Carlsson.
3343
3344         rendererIsNeeded() is only called during style resolve, which only happens
3345         while there's a Frame present.
3346
3347         * html/HTMLEmbedElement.cpp:
3348         (WebCore::HTMLEmbedElement::rendererIsNeeded):
3349         * html/HTMLMediaElement.cpp:
3350         (WebCore::HTMLMediaElement::rendererIsNeeded):
3351         * html/HTMLObjectElement.cpp:
3352         * html/HTMLObjectElement.h:
3353
3354 2013-09-11  Csaba Osztrogonác  <ossy@webkit.org>
3355
3356         ARM buildfix after r155491
3357         https://bugs.webkit.org/show_bug.cgi?id=121152
3358
3359         Reviewed by Anders Carlsson.
3360
3361         FELightingNEON.cpp and FELightingNEON.h is inside COMPILER(GCC) guard, so it's safe to use GCC attribute.
3362
3363         * platform/graphics/cpu/arm/filters/FELightingNEON.cpp: Use __aligned__ GCC attribute directly.
3364         * platform/graphics/cpu/arm/filters/FELightingNEON.h: Use __aligned__ GCC attribute instead of ugly template magic.
3365         (WebCore::FELighting::platformApplyNeon):
3366
3367 2013-09-11  peavo@outlook.com  <peavo@outlook.com>
3368
3369         [WinCairo] Compile errors.
3370         https://bugs.webkit.org/show_bug.cgi?id=121153
3371
3372         Reviewed by Brent Fulgham.
3373
3374         * page/win/FrameCairoWin.cpp:
3375         (WebCore::imageFromRect): Return empty GDIObject.
3376         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
3377         (WebCore::FontCustomPlatformData::fontPlatformData): Get actual handle from GDIObject.
3378
3379 2013-09-11  Darin Adler  <darin@apple.com>
3380
3381         Rework CSS parser, eliminating "floating" concept and using %destructor
3382         https://bugs.webkit.org/show_bug.cgi?id=121161
3383
3384         Reviewed by Antti Koivisto.
3385
3386         This is some basic improvement, but there is still room for a lot more
3387         consistent approach and formatting in this file. There is a mix of code that
3388         works by side effects in the CSSParser class and code that works with the
3389         values that bison generates in the union that is more or less random. And
3390         the data structures seem too costly, with too much heap allocation. And the
3391         CSSParser class has grown massive, with a mix of both function for use by
3392         code that wants to trigger parsing, and helper functions called by code in
3393         the grammar file. All of that can benefit from more refinement in the future.
3394
3395         * css/CSSGrammar.y.in: Made some incremental improvements to the structure
3396         of the grammar file, including:
3397         - Breaking up the %union so types are declared next to their use
3398         - Eliminating one shift/reduce conflict caused by two "maybe_space" in a row
3399         - Breaking the conditional sections out into their own sections instead of
3400           scattering them in with the other code.
3401         - Eliminating unused return values in productions such as charset,
3402           ignored_charset, namespace, margin_box, invalid_rule, save_block,
3403           invalid_at, and declarations_and_margins.
3404         - Adding %destructor to productions that return values that need to be deleted
3405           or deref'd. This removes the need for CSSParser to separately track these
3406           as "floating" to clean up in case of errors.
3407         - Removing unneeded productions such as media_feature, region_selector,
3408           attr_name, and medium.
3409         - Removing explicit code blocks that just say "$$ = $1" or empty blocks when
3410           there is no return type, since those are default.
3411         - Formatting many productions on single lines since I find them easier to read.
3412           Later I think we could make many more CSSParser functions and make even
3413           more of the production single lines in the grammar file.
3414         - Using adoptPtr, adoptRef, delete, deref, leakPtr, and leakRef to put
3415           heap allocated values into and out of the union without storage leaks.
3416           
3417         * css/CSSParser.cpp:
3418         (WebCore::CSSParser::~CSSParser): Remove the now-unneeded deleteAllValues for
3419         the various colections of floating things.
3420         (WebCore::CSSParser::createFilterRule): Don't put the rule into m_parsedRules,
3421         just return a PassRefPtr instead.
3422         (WebCore::CSSParser::createImportRule): Ditto.
3423         (WebCore::CSSParser::createMediaRule): Ditto.
3424         (WebCore::CSSParser::createEmptyMediaRule): Ditto.
3425         (WebCore::CSSParser::createSupportsRule): Ditto.
3426         (WebCore::CSSParser::createKeyframesRule): Ditto.
3427         (WebCore::CSSParser::createStyleRule): Ditto.
3428         (WebCore::CSSParser::createFontFaceRule): Ditto.
3429         (WebCore::CSSParser::createHostRule): Ditto.
3430         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded): Got rid of the
3431         unused return value from this function and changed it to to take a reference
3432         instead of a pointer.
3433         (WebCore::CSSParser::rewriteSpecifiersWithElementName): Ditto.
3434         (WebCore::CSSParser::rewriteSpecifiers): Changed this to take and return OwnPtr.
3435         (WebCore::CSSParser::createPageRule): Don't put rule into m_parsedRules, return
3436         PassRefPtr instead.
3437         (WebCore::CSSParser::createSelectorVector): Added. Used to implement the
3438         optimization where we recycle a single selector vector. Not sure we still need
3439         this, or maybe we need more optimizations like it, but for now keep it.
3440         (WebCore::CSSParser::recycleSelectorVector): Ditto.
3441         (WebCore::CSSParser::createRegionRule): Don't put rule into m_parsedRules, return
3442         PassRefPtr instead.
3443         (WebCore::CSSParser::createMarginAtRule): Got rid of unused return value.
3444         When this function is implemented for real, we might add a return value.
3445         (WebCore::CSSParser::createKeyframe): Don't put keyframe into m_parsedKeyframes,
3446         return PassRefPtr instead.
3447         (WebCore::CSSParser::createViewportRule): Don't put rule into m_parsedRules, return
3448         PassRefPtr instead.
3449
3450         * css/CSSParser.h: Removed many now-needed functions to manage floating items.
3451         Changed rule creation functions to return PassRefPtr. Other changes as mentioned above.
3452
3453         * css/CSSParserValues.cpp:
3454         (WebCore::destroy): Added.
3455         (WebCore::CSSParserValueList::~CSSParserValueList): Updated to call destroy.
3456         * css/CSSParserValues.h: Ditto.
3457
3458 2013-09-11  Mario Sanchez Prada  <mario.prada@samsung.com>
3459
3460         [GTK] Remove Gail dependency from build system for GTK3
3461         https://bugs.webkit.org/show_bug.cgi?id=119673
3462
3463         Reviewed by Gustavo Noronha Silva.
3464
3465         * GNUmakefile.am: Removed GAIL_CFLAGS.
3466         * PlatformGTK.cmake: Removed GAIL3_INCLUDE_DIRS and GAIL3_LIBRARIES.
3467
3468 2013-09-11  Andreas Kling  <akling@apple.com>
3469
3470         Remove Widget::widgetPositionsUpdated().
3471         <https://webkit.org/b/121160>
3472
3473         Reviewed by Anders Carlsson.
3474
3475         Remove this no-op virtual that was only used by chromium.
3476
3477 2013-09-11  Andreas Kling  <akling@apple.com>
3478
3479         Page::backForward() should return a reference.
3480         <https://webkit.org/b/121151>
3481
3482         Reviewed by Anders Carlsson.
3483
3484         There is always a BackForwardController, so make backForward() return a reference.
3485         Also made it store a Page& internally since it's tied to the lifetime of Page.
3486
3487 2013-09-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3488
3489         WTF::OwnPtr should behave similarly with the rest of WTF smart pointers
3490         https://bugs.webkit.org/show_bug.cgi?id=120773
3491
3492         Reviewed by Anders Carlsson.
3493
3494         Before the change OwnPtr could take either the pointer type or the pointed-to type, which was bad
3495         for the following reasons:
3496         - It distinguished OwnPtr behaviour from other WTF smart pointer classes behaviour (so it was confusing for the Client).
3497         - It was potential error-prone as it actually modified the type given by the Client in opaque way.
3498
3499         * page/animation/CSSPropertyAnimation.cpp:
3500         (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
3501         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
3502
3503 2013-09-11  Andreas Kling  <akling@apple.com>
3504
3505         FrameView: Tighten widget handling code.
3506         <https://webkit.org/b/121155>
3507
3508         Reviewed by Antti Koivisto.
3509
3510         Harden typing in this code to work with RenderEmbeddedObject& instead of RenderObject*.
3511         Functions and members renamed to reflect that they only deal with embedded objects.
3512
3513         * html/HTMLPlugInImageElement.h:
3514         (WebCore::toHTMLPlugInImageElement):
3515
3516             Add a toHTMLPlugInImageElement that takes an Element&.
3517
3518         * html/HTMLTagNames.in:
3519
3520             Generate type helpers for applet and embed elements.
3521
3522         * page/FrameView.h:
3523         * page/FrameView.cpp:
3524         (WebCore::FrameView::addEmbeddedObjectToUpdate):
3525         (WebCore::FrameView::removeEmbeddedObjectToUpdate):
3526         (WebCore::FrameView::updateEmbeddedObjects):
3527         (WebCore::FrameView::updateEmbeddedObject):
3528
3529             Re-ordered this function in early return style. Change locals into references.
3530
3531         * rendering/RenderEmbeddedObject.cpp:
3532         (WebCore::RenderEmbeddedObject::~RenderEmbeddedObject):
3533         (WebCore::RenderEmbeddedObject::layout):
3534         * rendering/RenderSnapshottedPlugIn.cpp:
3535         (WebCore::RenderSnapshottedPlugIn::layout):
3536
3537             Updated for new FrameView function signatures.
3538
3539 2013-09-11  Patrick Gansterer  <paroga@webkit.org>
3540
3541         [CMake] Split out generic Windows files into its own file
3542         https://bugs.webkit.org/show_bug.cgi?id=119514
3543
3544         Reviewed by Gyuyoung Kim.
3545
3546         This allows us to add smaller CMakeLists.txt files when
3547         adding additional Windows ports.
3548
3549         * PlatformWin.cmake: Copied from Source/WebCore/PlatformWinCE.cmake.
3550         * PlatformWinCE.cmake:
3551
3552 2013-09-11  Mario Sanchez Prada  <mario.prada@samsung.com>
3553
3554         [GTK] Get rid of Pango/Gail dependencies in accessibility for ATK
3555         https://bugs.webkit.org/show_bug.cgi?id=114867
3556
3557         Reviewed by Martin Robinson.
3558
3559         Removed all trace of Gail and Pango specific code from the AtkText
3560         implementation, now everything has been reimplemented.
3561
3562         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3563         (webkitAccessibleTextGetTextForOffset): Removed fallback code
3564         relying in Gail/Pango, now all the related code has been
3565         removed. Also, replaced the collection of if statements with a
3566         switch, for better readability of the code.
3567
3568 2013-09-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3569
3570         Mouseenter/-leave not triggered when element under cursor is moved/removed
3571         https://bugs.webkit.org/show_bug.cgi?id=120786
3572
3573         Reviewed by Antonio Gomes.
3574
3575         When a hovered element is detached it will now emit a fake mousemove event
3576         similar to what happens when a hovered element has CSS display set to none.
3577
3578         Test: fast/events/mouseenterleave-detached-element.html
3579
3580         * dom/Document.cpp:
3581         (WebCore::Document::hoveredElementDidDetach):
3582         * page/EventHandler.cpp:
3583         (WebCore::EventHandler::EventHandler):
3584         (WebCore::EventHandler::clear):
3585         (WebCore::EventHandler::handleMouseMoveEvent):
3586         * page/EventHandler.h:
3587
3588 2013-09-11  Krzysztof Czech  <k.czech@samsung.com>
3589
3590         [ATK] Adds mapping MenuItemRadioRole to ATK
3591         https://bugs.webkit.org/show_bug.cgi?id=121149
3592
3593         Reviewed by Mario Sanchez Prada.
3594
3595         Adds mapping MenuItemRadioRole to ATK.
3596
3597         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3598         (atkRole):
3599
3600 2013-09-10  Mario Sanchez Prada  <mario.prada@samsung.com>
3601
3602         [GTK] Reimplement atk_text_get_text_*_offset for LINE boundaries
3603         https://bugs.webkit.org/show_bug.cgi?id=114872
3604
3605         Reviewed by Gustavo Noronha Silva.
3606
3607         Re-implement these functions without using GailTextUtil nor Pango.
3608
3609         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3610         (lineAtPositionForAtkBoundary): New helper function to find the
3611         line at a given position considering values of AtkTextBoundary.
3612         (webkitAccessibleTextLineForBoundary): New function,
3613         implementing atk_text_get_text_*_offset for LINE.
3614         (webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
3615         LINE boundaries with webkitAccessibleTextLineForBoundary().
3616
3617 2013-09-11  Andreas Kling  <akling@apple.com>
3618
3619         Missed one BackForwardListImpl.h in the last commit.
3620
3621         * history/BackForwardList.cpp:
3622
3623 2013-09-11  Andreas Kling  <akling@apple.com>
3624
3625         Rename BackForwardListImpl.{cpp,h} => BackForwardClient.{cpp,h}
3626
3627         Rubber-stamped by Antti Koivisto.
3628
3629 2013-09-10  Ryosuke Niwa  <rniwa@webkit.org>
3630
3631         CSSProperty::isInheritedProperty is large
3632         https://bugs.webkit.org/show_bug.cgi?id=121083
3633
3634         Reviewed by Sam Weinig.
3635
3636         Support [Inherited] option in makeprop.pl and generate CSSProperty::isInheritedProperty in CSSPropertyNames.cpp
3637         using a lookup table. We can pack the table better by using bitfield in the future but I think boolean lookup
3638         table is a good first cut.
3639
3640         Updated CSSPropertyNames.in and SVGCSSPropertyNames.in to use the new option and removed the old code from
3641         CSSProperty.cpp.
3642
3643         * css/CSSProperty.cpp:
3644         * css/CSSPropertyNames.in:
3645         * css/SVGCSSPropertyNames.in:
3646         * css/makeprop.pl:
3647
3648 2013-09-11  Andreas Kling  <akling@apple.com>
3649
3650         Rename BackForwardListImpl => BackForwardList.
3651         <https://webkit.org/b/121146>
3652
3653         Reviewed by Antti Koivisto.
3654
3655         Nuke another old FIXME.
3656
3657 2013-09-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3658
3659         Generate more HTML type checks and casting
3660         https://bugs.webkit.org/show_bug.cgi?id=121080
3661
3662         Reviewed by Andreas Kling.
3663
3664         Clean-up remained functions of HTML elements using auto-generated isFooElement(),
3665         and replace toFooElement() with ELEMENT_TYPE_CASTS() macro.
3666
3667         Besides this patch clean-up unnecessary checks which are being supported by
3668         auto-generated isFooElement().
3669
3670         No new tests, no behavior change.
3671
3672         * accessibility/atk/AXObjectCacheAtk.cpp:
3673         (WebCore::notifyChildrenSelectionChange):
3674         * html/HTMLFrameElementBase.h:
3675         (WebCore::toHTMLFrameElementBase):
3676         * html/HTMLIFrameElement.h:
3677         * html/HTMLImageLoader.cpp:
3678         (WebCore::HTMLImageLoader::dispatchLoadEvent):
3679         (WebCore::HTMLImageLoader::notifyFinished):
3680         * html/HTMLObjectElemenaeh:
3681         * html/HTMLOptionsCollection.cpp:
3682         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
3683         * html/HTMLSelectElement.h:
3684         * html/HTMLTagNames.in:
3685         * html/HTMLVideoElement.h:
3686         * html/shadow/HTMLContentElement.h:
3687         * loader/ImageLoader.cpp:
3688         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
3689         * loader/archive/cf/LegacyWebArchive.cpp:
3690         (WebCore::LegacyWebArchive::create):
3691         * page/PageSerializer.cpp:
3692         (WebCore::frameOwnerURLAttributeName):
3693         * page/SpatialNavigation.cpp:
3694         (WebCore::canScrollInDirection):
3695         * platform/gtk/PasteboardGtk.cpp:
3696         (WebCore::getURLForImageNode):
3697         * plugins/IFrameShimSupport.cpp:
3698         (WebCore::getPluginOcclusions):
3699         * rendering/HitTestResult.cpp:
3700         (WebCore::HitTestResult::mediaSupportsFullscreen):
3701         (WebCore::HitTestResult::mediaElement):
3702         (WebCore::HitTestResult::enterFullscreenForVideo):
3703         (WebCore::HitTestResult::mediaIsVideo):
3704
3705         * rendering/RenderLayerCompositor.cpp:
3706         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
3707         * rendering/RenderListBox.cpp:
3708         (WebCore::RenderListBox::RenderListBox):
3709         * rendering/RenderMenuList.cpp:
3710         (WebCore::RenderMenuList::RenderMenuList):
3711         * testing/Internals.cpp:
3712         (WebCore::Internals::isSelectPopupVisible):
3713
3714 2013-09-11  Chris Fleizach  <cfleizach@apple.com>
3715
3716         AX: Mac platform is not using accessibilityTitle from the Base implementation
3717         https://bugs.webkit.org/show_bug.cgi?id=121109
3718
3719         Reviewed by Sam Weinig.
3720
3721         Remove the Mac platform overrides of accessibilityTitle, Description, HelpText. 
3722         The Base implementation has these and we can share them between iOS and Mac
3723
3724         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
3725         (-[WebAccessibilityObjectWrapperBase accessibilityTitle]):
3726         (-[WebAccessibilityObjectWrapperBase accessibilityDescription]):
3727         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3728
3729 2013-09-11  Andreas Kling  <akling@apple.com>
3730
3731         Rename BackForwardList.h => BackForwardClient.h
3732
3733         Rubber-stamped by Antti Koivisto.
3734
3735 2013-09-11  Andreas Kling  <akling@apple.com>
3736
3737         Rename BackForwardList => BackForwardClient.
3738         <https://webkit.org/b/121143>
3739
3740         Reviewed by Antti Koivisto.
3741
3742         Nuke a 3 year old FIXME about renaming this class.
3743
3744 2013-09-10  Daniel Bates  <dabates@apple.com>
3745
3746         [iOS] Upstream text autosizing
3747         https://bugs.webkit.org/show_bug.cgi?id=121111
3748
3749         Reviewed by Andy Estes and Sam Weinig.
3750
3751         Tests: platform/iphone-simulator/text-autosizing/anonymous-block.html
3752                platform/iphone-simulator/text-autosizing/contenteditable.html
3753                platform/iphone-simulator/text-autosizing/first-letter.html
3754                platform/iphone-simulator/text-autosizing/font-family-case-insensitive.html
3755                platform/iphone-simulator/text-autosizing/lists.html
3756                platform/iphone-simulator/text-autosizing/overflow.html
3757                platform/iphone-simulator/text-autosizing/percent-adjust-length-line-height.html
3758                platform/iphone-simulator/text-autosizing/percent-adjust-number-line-height.html
3759                platform/iphone-simulator/text-autosizing/percent-adjust-percent-line-height.html
3760
3761         * WebCore.exp.in:
3762         * WebCore.xcodeproj/project.pbxproj:
3763         * css/CSSComputedStyleDeclaration.cpp:
3764         (WebCore::ComputedStyleExtractor::propertyValue):
3765         * css/CSSParser.cpp:
3766         (WebCore::isValidKeywordPropertyAndValue):
3767         (WebCore::CSSParser::parseValue):
3768         * css/CSSProperty.cpp:
3769         (WebCore::CSSProperty::isInheritedProperty):
3770         * css/CSSPropertyNames.in: Add property -webkit-text-size-adjust.
3771         * css/DeprecatedStyleBuilder.cpp:
3772         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Added.
3773         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInitialValue): Added.
3774         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInheritValue): Added.
3775         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::createHandler): Added.
3776         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3777         * css/StyleResolver.cpp:
3778         (WebCore::StyleResolver::updateFont):
3779         (WebCore::StyleResolver::applyProperties): Add COMPILE_ASSERT to ensure that
3780         all properties that affect font size, including -webkit-text-size-adjust, are
3781         resolved before properties that depend on them; see <rdar://problem/13522835>.
3782         (WebCore::StyleResolver::applyProperty):
3783         (WebCore::StyleResolver::checkForTextSizeAdjust): Added.
3784         * css/StyleResolver.h:
3785         * dom/Document.cpp:
3786         (WebCore::TextAutoSizingTraits::constructDeletedValue): Added.
3787         (WebCore::TextAutoSizingTraits::isDeletedValue): Added.
3788         (WebCore::Document::detach):
3789         (WebCore::Document::addAutoSizingNode): Added.
3790         (WebCore::Document::validateAutoSizingNodes): Added.
3791         (WebCore::Document::resetAutoSizingNodes): Added.
3792         * dom/Document.h:
3793         * editing/EditingStyle.cpp:
3794         * page/Frame.h: Add declarations for setTextAutosizingWidth(), textAutosizingWidth().
3795         * page/FrameView.cpp:
3796         (WebCore::FrameView::layout):
3797         * page/Settings.in: Generate setter and getter for setting minimumZoomFontSize.
3798         * platform/graphics/Font.h:
3799         (WebCore::Font::equalForTextAutoSizing): Added.
3800         * platform/graphics/FontDescription.cpp:
3801         (WebCore::FontDescription::familiesEqualForTextAutoSizing): Added.
3802         * platform/graphics/FontDescription.h:
3803         (WebCore::FontDescription::equalForTextAutoSizing): Added.
3804         * rendering/RenderBlock.cpp:
3805         (WebCore::RenderBlock::RenderBlock):
3806         (WebCore::isVisibleRenderText): Added.
3807         (WebCore::resizeTextPermitted): Added.
3808         (WebCore::RenderBlock::immediateLineCount): Added.
3809         (WebCore::isNonBlocksOrNonFixedHeightListItems): Added.
3810         (WebCore::oneLineTextMultiplier): Added.
3811         (WebCore::textMultiplier): Added.
3812         (WebCore::RenderBlock::adjustComputedFontSizes): Added.
3813         * rendering/RenderBlock.h:
3814         (WebCore::RenderBlock::resetComputedFontSize): Added.
3815         * rendering/RenderObject.cpp:
3816         (WebCore::RenderObject::traverseNext): Added.
3817         (WebCore::includeNonFixedHeight): Added.
3818         (WebCore::RenderObject::adjustComputedFontSizesOnBlocks): Added.
3819         (WebCore::RenderObject::resetTextAutosizing): Added.
3820         * rendering/RenderObject.h:
3821         * rendering/RenderText.cpp:
3822         (WebCore::RenderText::RenderText):
3823         * rendering/RenderText.h:
3824         (WebCore::RenderText::candidateComputedTextSize): Added.
3825         (WebCore::RenderText::setCandidateComputedTextSize): Added.
3826         * rendering/style/RenderStyle.cpp:
3827         (WebCore::computeFontHash):
3828         (WebCore::RenderStyle::hashForTextAutosizing): Added.
3829         (WebCore::RenderStyle::equalForTextAutosizing): Added.
3830         (WebCore::RenderStyle::changeRequiresLayout):
3831         (WebCore::RenderStyle::specifiedLineHeight): Added; iOS-specific variant.
3832         We should reconcile this getter with the getter of the same name that is
3833         compiled when building with IOS_TEXT_AUTOSIZING disabled.
3834         (WebCore::RenderStyle::setSpecifiedLineHeight): Added.
3835         * rendering/style/RenderStyle.h:
3836         (WebCore::RenderStyle::initialSpecifiedLineHeight): Added.
3837         (WebCore::RenderStyle::initialTextSizeAdjust): Added.
3838         (WebCore::RenderStyle::setTextSizeAdjust): Added.
3839         (WebCore::RenderStyle::textSizeAdjust): Added.
3840         * rendering/style/StyleInheritedData.cpp:
3841         (WebCore::StyleInheritedData::StyleInheritedData):
3842         (WebCore::StyleInheritedData::operator==):
3843         * rendering/style/StyleInheritedData.h:
3844         * rendering/style/StyleRareInheritedData.cpp:
3845         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3846         (WebCore::StyleRareInheritedData::operator==):
3847         * rendering/style/StyleRareInheritedData.h:
3848         * rendering/style/TextSizeAdjustment.h: Added.
3849         (TextSizeAdjustment::TextSizeAdjustment):
3850         (TextSizeAdjustment::percentage):
3851         (TextSizeAdjustment::multiplier):
3852         (TextSizeAdjustment::isAuto):
3853         (TextSizeAdjustment::isNone):
3854         (TextSizeAdjustment::isPercentage):
3855         (TextSizeAdjustment::operator == ):
3856         (TextSizeAdjustment::operator != ):
3857
3858 2013-09-10  Chris Fleizach  <cfleizach@apple.com>
3859
3860         AX: AXValue/AXMenuItemMarkChar not defined for menuitemradio (should be false (0) with aria-checked=mixed | undefined)
3861         https://bugs.webkit.org/show_bug.cgi?id=120372
3862
3863         Reviewed by Mario Sanchez Prada.
3864
3865         Add new roles to make the distinction between menu item, menu item radio and menu item checkbox.
3866         Expose AXValue for menu items, so that they can convey the, on/off/mixed state of aria-checked.
3867
3868         Test: platform/mac/accessibility/menu-item-values.html
3869
3870         * accessibility/AccessibilityNodeObject.cpp:
3871         (WebCore::AccessibilityNodeObject::isMenuRelated):
3872         (WebCore::AccessibilityNodeObject::isMenuItem):
3873         (WebCore::AccessibilityNodeObject::isChecked):
3874         (WebCore::AccessibilityNodeObject::actionElement):
3875         (WebCore::AccessibilityNodeObject::visibleText):
3876         (WebCore::AccessibilityNodeObject::title):
3877         * accessibility/AccessibilityObject.cpp:
3878         (WebCore::createARIARoleMap):
3879         (WebCore::AccessibilityObject::checkboxOrRadioValue):
3880         * accessibility/AccessibilityObject.h:
3881         * accessibility/AccessibilityRenderObject.cpp:
3882         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3883         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3884         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
3885         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
3886         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3887         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
3888         (createAccessibilityRoleMap):
3889         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3890
3891 2013-09-10  Anders Carlsson  <andersca@apple.com>
3892
3893         Remove wtf/Alignment.h
3894         https://bugs.webkit.org/show_bug.cgi?id=121077
3895
3896         Reviewed by Andreas Kling.
3897
3898         * platform/PODArena.h:
3899         (WebCore::PODArena::minAlignment):
3900         * platform/graphics/cpu/arm/filters/FELightingNEON.h:
3901         (WebCore::FELighting::platformApplyNeon):
3902
3903 2013-09-10  Zoltan Horvath  <zoltan@webkit.org>
3904
3905         [Qt] Add FloatingObjects.h to Target.pri
3906         https://bugs.webkit.org/show_bug.cgi?id=121117
3907
3908         Reviewed by Andreas Kling.
3909
3910         No new tests, no behavior change.
3911
3912         * Target.pri:
3913
3914 2013-09-10  Sergio Correia  <sergio.correia@openbossa.org>
3915
3916         Fix EFL build after r155477
3917         https://bugs.webkit.org/show_bug.cgi?id=121126
3918
3919         Reviewed by Antonio Gomes.
3920
3921         No new tests, build fix.
3922
3923         * CMakeLists.txt: MediaStreamComponent.cpp and MediaStreamDescriptor.cpp
3924         were added with an incorrect path.
3925
3926 2013-09-10  Andreas Kling  <akling@apple.com>
3927
3928         AnimationController should have a Frame& internally.
3929         <https://webkit.org/b/121078>
3930
3931         Reviewed by Anders Carlsson.
3932
3933         The AnimationController is owned by the Frame so make the back-pointer
3934         a reference. This knocks off a couple of null checks.
3935
3936 2013-09-10  Anders Carlsson  <andersca@apple.com>
3937
3938         More WTF/Alignment.h removal
3939         https://bugs.webkit.org/show_bug.cgi?id=121125
3940
3941         Reviewed by Andreas Kling.
3942
3943         * platform/PODArena.h:
3944
3945 2013-09-10  Eric Carlson  <eric.carlson@apple.com>
3946
3947         Make MediaStream objects ScriptWrappable
3948         https://bugs.webkit.org/show_bug.cgi?id=120879
3949
3950         Reviewed by Jer Noble.
3951
3952         * Modules/mediastream/MediaStream.h: Inherit from ScriptWrappable.
3953         * Modules/mediastream/MediaStreamTrack.h: Ditto.
3954         * Modules/mediastream/RTCDTMFSender.h: Ditto.
3955         * Modules/mediastream/RTCDataChannel.h: Ditto.
3956         * Modules/mediastream/RTCIceCandidate.h: Ditto.
3957         * Modules/mediastream/RTCPeerConnection.h: Ditto.
3958         * Modules/mediastream/RTCSessionDescription.h: Ditto.
3959         * Modules/mediastream/RTCStatsReport.h: Ditto.
3960         * Modules/mediastream/RTCStatsResponse.h: Ditto.
3961
3962 2013-09-10  Eric Carlson  <eric.carlson@apple.com>
3963
3964         Split MediaStreamDescriptor.h and MediaStreamComponent.h into .h and .cpp
3965         https://bugs.webkit.org/show_bug.cgi?id=120878
3966
3967         Reviewed by Jer Noble.
3968
3969         No new tests, no functional change.
3970
3971         * CMakeLists.txt: Add MediaStreamComponent.cpp and MediaStreamDescriptor.cpp.
3972         * GNUmakefile.list.am: Ditto.
3973
3974         * Modules/mediastream/LocalMediaStream.cpp:
3975         (WebCore::LocalMediaStream::create): MediaStreamDescriptor::create() doesn't take a UUID.
3976
3977         * Modules/mediastream/MediaStream.cpp:
3978         (WebCore::createFromSourceVectors): Ditto.
3979
3980         * WebCore.xcodeproj/project.pbxproj: Add MediaStreamComponent.cpp and MediaStreamDescriptor.cpp.
3981
3982         * platform/mediastream/MediaStreamComponent.cpp: Added.
3983         * platform/mediastream/MediaStreamComponent.h:
3984
3985         * platform/mediastream/MediaStreamDescriptor.cpp: Added.
3986         * platform/mediastream/MediaStreamDescriptor.h:
3987
3988 2013-09-10  Brent Fulgham  <bfulgham@apple.com>
3989
3990         [Windows] Create SharedGDIObject Class Template
3991         https://bugs.webkit.org/show_bug.cgi?id=121037
3992
3993         Reviewed by Anders Carlsson.
3994
3995         * WebCore.vcxproj/WebCore.vcxproj: Remove RefCountedGDIHandle.h, and
3996         add new SharedGDIObject.h file.
3997         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3998         * platform/graphics/FontPlatformData.h:
3999         (WebCore::FontPlatformData::hfont): Switch to new SharedGDIObject.
4000         * platform/graphics/win/FontPlatformDataCGWin.cpp:
4001         (WebCore::FontPlatformData::FontPlatformData): Ditto.
4002         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
4003         (WebCore::FontPlatformData::FontPlatformData): Ditto.
4004         * platform/graphics/win/FontPlatformDataWin.cpp:
4005         (WebCore::FontPlatformData::FontPlatformData): Ditto.
4006         * platform/graphics/win/RefCountedGDIHandle.h: Removed.
4007         * platform/graphics/win/SharedGDIObject.h: Added.
4008         (WebCore::SharedGDIObject::create):
4009         (WebCore::SharedGDIObject::get):
4010         (WebCore::SharedGDIObject::hash):
4011         (WebCore::SharedGDIObject::SharedGDIObject):
4012
4013 2013-09-10  Tim Horton  <timothy_horton@apple.com>
4014
4015         [mac] PDFDocumentImage should use PDFKit to draw
4016         https://bugs.webkit.org/show_bug.cgi?id=120651
4017         <rdar://problem/12810731>
4018
4019         Unreviewed hopeful build fix.
4020
4021         * platform/graphics/mac/PDFDocumentImageMac.mm:
4022
4023 2013-09-10  Tim Horton  <timothy_horton@apple.com>
4024
4025         [mac] PDFDocumentImage should use PDFKit to draw
4026         https://bugs.webkit.org/show_bug.cgi?id=120651
4027         <rdar://problem/12810731>
4028
4029         Reviewed by Alexey Proskuryakov.
4030
4031         Use PDFKit to draw PDF-in-<img> on Mac, so that annotations in PDF are painted.
4032
4033         Test: fast/images/pdf-as-image-with-annotations.html
4034
4035         * WebCore.xcodeproj/project.pbxproj:
4036         Add PDFDocumentImageMac.mm.
4037
4038         * platform/graphics/cg/PDFDocumentImage.cpp:
4039         (WebCore::PDFDocumentImage::PDFDocumentImage):
4040         We don't need to initialize m_document anymore because it's now a RetainPtr.
4041         Initialize m_hasPage to false.
4042
4043         (WebCore::PDFDocumentImage::~PDFDocumentImage):
4044         We don't need to manually release our CGPDFDocumentRef anymore because it's now a RetainPtr.
4045
4046         (WebCore::PDFDocumentImage::size):
4047         Use expandedIntSize for explicitness.
4048
4049         (WebCore::PDFDocumentImage::applyRotationForPainting):
4050         Rename adjustCTM to applyRotationForPainting, and move the one non-rotation related transformation out.
4051         We need to do this because PDFKit applies the rotation transformation itself, so we don't need to.
4052         Also, explicitly use std::min instead of importing the whole std namespace.
4053
4054         (WebCore::PDFDocumentImage::dataChanged):
4055         Assert that we don't re-enter dataChanged after we've created a document,
4056         because it seems like that shouldn't happen - we only create a document when
4057         we've supposedly received all data, and it would be nice if we didn't have
4058         all this varying code to deal with SharedBuffers changing out from under each other.
4059         Factor the code to create a CGPDFDocumentRef out into createPDFDocument, so we can
4060         replace it with a different implementation that creates a PDFDocument.
4061
4062         (WebCore::PDFDocumentImage::setCurrentPage):
4063         Make all page-number-related things unsigned, since they are in CG and PDFKit,
4064         and add m_hasPage to denote whether we've acquired a valid page yet.
4065         Factor code to retrieve the PDF box bounds into computeBoundsForCurrentPage.
4066         Remove setCurrentPage itself, as we never use a page other than the first page;
4067         we will call computeBoundsForCurrentPage and set hasPage in dataChanged, now.
4068
4069         (WebCore::PDFDocumentImage::draw):
4070         Fix a weird comment.
4071         Factor code that actually draws the PDF out into drawPDFPage.
4072
4073         The rest of the functions in this file are only built for USE(CG) && !PLATFORM(MAC):
4074
4075         (WebCore::PDFDocumentImage::createPDFDocument):
4076         Factored out of dataChanged(). Use the PLATFORM(MAC) way of making a
4077         CGDataProvider from a SharedBuffer everywhere; we're already using it on
4078         iOS, and it should also work for Windows, the only other USE(CG) platform.
4079         Since we only createPDFDocument() after all data has been received, remove
4080         the comment about the SharedBuffer being secretly written to behind its back.
4081
4082         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage):
4083         Factored out of setCurrentPage().
4084         Use deg2rad since we have it.
4085
4086         (WebCore::PDFDocumentImage::pageCount):
4087         (WebCore::PDFDocumentImage::drawPDFPage):
4088         Factored out of draw().
4089         Reduced an unnecessary transform (we were effectively doing mediaBox.origin - cropBox.origin - mediaBox.origin).
4090
4091         * platform/graphics/cg/PDFDocumentImage.h:
4092         Unindent all the things, as we don't indent the first level inside a namespace scope.
4093         Forward-declare PDFDocument.
4094         Make m_currentPage unsigned as it should be.