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