[V8] Vastly simplify V8GCController's NodeVisitor
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-22  Adam Barth  <abarth@webkit.org>
2
3         [V8] Vastly simplify V8GCController's NodeVisitor
4         https://bugs.webkit.org/show_bug.cgi?id=99884
5
6         Reviewed by Kentaro Hara.
7
8         NodeVisitor was vastly more complicated than necessary.
9
10         This patch improve performance on these new gc benchmarks:
11
12         gc-forest: 1.14% better
13         gc-mini-tree: 5.09% better
14         gc-tree: 4.60% better
15
16         * bindings/v8/V8GCController.cpp:
17         (WebCore::ObjectVisitor::visitDOMWrapper):
18         (WebCore::addImplicitReferencesForNodeWithEventListeners):
19         (WebCore::rootForGC):
20         (WebCore::NodeVisitor::visitDOMWrapper):
21         (WebCore::NodeVisitor::applyGrouping):
22         (NodeVisitor):
23
24 2012-10-22  Emil A Eklund  <eae@chromium.org>
25
26         Change baselinePosition and maxAscent/maxDescent to int
27         https://bugs.webkit.org/show_bug.cgi?id=99767
28
29         Reviewed by Levi Weintraub.
30
31         Currently baselinePostion, maxAscent and maxDescent are
32         LayoutUnits while ascent, descent and m_lineHeight are ints.
33         This can lead to subtle alignment and rounding problems.
34
35         Change baselinePosition and maxAscent/maxDescent to int to avoid
36         these issues.
37
38         Test: fast/sub-pixel/replaced-element-baseline.html
39
40         * editing/FrameSelection.cpp:
41         (WebCore::repaintRectForCaret):
42         Inflate Y dimension just like we do for X to ensure that the
43         repaint rect fully contains the caret.
44
45         * rendering/InlineBox.cpp:
46         (WebCore::InlineBox::baselinePosition):
47         * rendering/InlineBox.h:
48         (InlineBox):
49         * rendering/InlineFlowBox.cpp:
50         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
51         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
52         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
53         Change maxAscent/maxDescent to int to match ascent/descent.
54         
55         * rendering/InlineFlowBox.h:
56         (InlineFlowBox):
57         * rendering/InlineTextBox.cpp:
58         (WebCore::InlineTextBox::baselinePosition):
59         * rendering/InlineTextBox.h:
60         (InlineTextBox):
61         * rendering/RenderBlock.cpp:
62         (WebCore::RenderBlock::baselinePosition):
63         (WebCore::RenderBlock::firstLineBoxBaseline):
64         (WebCore::RenderBlock::lastLineBoxBaseline):
65         * rendering/RenderBlock.h:
66         (RenderBlock):
67         * rendering/RenderBox.cpp:
68         (WebCore::RenderBox::baselinePosition):
69         * rendering/RenderBox.h:
70         (WebCore::RenderBox::firstLineBoxBaseline):
71         (WebCore::RenderBox::lastLineBoxBaseline):
72         (RenderBox):
73         * rendering/RenderBoxModelObject.h:
74         (RenderBoxModelObject):
75         * rendering/RenderFlexibleBox.cpp:
76         (WebCore::RenderFlexibleBox::baselinePosition):
77         (WebCore::RenderFlexibleBox::firstLineBoxBaseline):
78         * rendering/RenderFlexibleBox.h:
79         * rendering/RenderInline.cpp:
80         (WebCore::RenderInline::baselinePosition):
81         * rendering/RenderInline.h:
82         (RenderInline):
83         * rendering/RenderListBox.cpp:
84         (WebCore::RenderListBox::baselinePosition):
85         * rendering/RenderListBox.h:
86         (RenderListBox):
87         * rendering/RenderListMarker.cpp:
88         (WebCore::RenderListMarker::baselinePosition):
89         * rendering/RenderListMarker.h:
90         (RenderListMarker):
91         * rendering/RenderSlider.cpp:
92         (WebCore::RenderSlider::baselinePosition):
93         * rendering/RenderSlider.h:
94         (RenderSlider):
95         * rendering/RenderTable.cpp:
96         (WebCore::RenderTable::baselinePosition):
97         (WebCore::RenderTable::lastLineBoxBaseline):
98         (WebCore::RenderTable::firstLineBoxBaseline):
99         * rendering/RenderTable.h:
100         (RenderTable):
101         * rendering/RenderTableSection.cpp:
102         (WebCore::RenderTableSection::firstLineBoxBaseline):
103         * rendering/RenderTableSection.h:
104         (RenderTableSection):
105         * rendering/RenderTextControlMultiLine.cpp:
106         (WebCore::RenderTextControlMultiLine::baselinePosition):
107         * rendering/RenderTextControlMultiLine.h:
108         (RenderTextControlMultiLine):
109         * rendering/RenderTheme.cpp:
110         (WebCore::RenderTheme::baselinePosition):
111         * rendering/RenderTheme.h:
112         (RenderTheme):
113         * rendering/RenderThemeSafari.cpp:
114         (WebCore::RenderThemeSafari::baselinePosition):
115         * rendering/RenderThemeSafari.h:
116         (RenderThemeSafari):
117         * rendering/RootInlineBox.cpp:
118         (WebCore::RootInlineBox::baselinePosition):
119         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
120         * rendering/RootInlineBox.h:
121         (RootInlineBox):
122         * rendering/mathml/RenderMathMLBlock.cpp:
123         (WebCore::RenderMathMLBlock::baselinePosition):
124         (WebCore::RenderMathMLTable::firstLineBoxBaseline):
125         * rendering/mathml/RenderMathMLBlock.h:
126         (RenderMathMLBlock):
127         (RenderMathMLTable):
128         * rendering/mathml/RenderMathMLFraction.cpp:
129         (WebCore::RenderMathMLFraction::firstLineBoxBaseline):
130         * rendering/mathml/RenderMathMLFraction.h:
131         (RenderMathMLFraction):
132         * rendering/mathml/RenderMathMLOperator.cpp:
133         (WebCore::RenderMathMLOperator::firstLineBoxBaseline):
134         * rendering/mathml/RenderMathMLOperator.h:
135         * rendering/mathml/RenderMathMLUnderOver.cpp:
136         (WebCore::RenderMathMLUnderOver::firstLineBoxBaseline):
137         * rendering/mathml/RenderMathMLUnderOver.h:
138         (RenderMathMLUnderOver):
139
140 2012-10-22  Emil A Eklund  <eae@chromium.org>
141
142         Modify LayoutState ASSERTS to support SATURATED_LAYOUT_ARITHMETIC
143         https://bugs.webkit.org/show_bug.cgi?id=98692
144
145         Reviewed by Dan Bernstein.
146
147         We currently overflow/wrap when computing the delta in
148         RenderBlock::setLogicalTopForChild in cases where we have an
149         element with a width or height exceeding maxLayoutUnit. When
150         the delta is later added back in RenderBlock::layoutBlockChild
151         the number wraps again getting us back to the correct value.
152
153         With SATURATED_LAYOUT_ARITHMETIC enabled the values no longer
154         wraps, which seems like the correct thing to do however this
155         causes the compare to fail for obvious reasons. By accounting
156         for this we can keep the asserts (which have proven very
157         helpful) even when SATURATED_LAYOUT_ARITHMETIC is turned on.
158
159         No new tests, covered by existing tests.
160
161         * rendering/LayoutState.cpp:
162         (WebCore::LayoutState::LayoutState):
163         * rendering/LayoutState.h:
164         (WebCore::LayoutState::LayoutState):
165         (LayoutState):
166         * rendering/RenderBlock.cpp:
167         (WebCore::RenderBlock::layoutBlockChild):
168         * rendering/RenderView.cpp:
169         (WebCore::RenderView::layout):
170         * rendering/RenderView.h:
171         (WebCore::RenderView::addLayoutDelta):
172         (RenderView):
173         (WebCore::RenderView::layoutDeltaMatches):
174
175 2012-10-22  Tony Chang  <tony@chromium.org>
176
177         Fix some baseline flexbox alignment
178         https://bugs.webkit.org/show_bug.cgi?id=99879
179
180         Reviewed by Ojan Vafai.
181
182         Fix a bug where we weren't handling margin properly on inline-flexbox.
183         Fix a bug where we weren't getting the edge of the content box properly when synthesizing
184         a baseline.
185
186         Test: css3/flexbox/flexbox-baseline-margins.html
187
188         * rendering/RenderBlock.cpp:
189         (WebCore::RenderBlock::baselinePosition):
190         (WebCore::RenderBlock::inlineBlockBaseline): Add a new method that is used when calculating an inline-block's
191         baseline. Previously we would use lastLineBoxBaseline.
192         (WebCore::RenderBlock::lastLineBoxBaseline): Pass in direction and when searching children, use inlineBlockBaseline.
193         * rendering/RenderBlock.h:
194         (RenderBlock): Make lastLineBoxBaseline non-virtual.
195         * rendering/RenderBox.h:
196         (WebCore::RenderBox::inlineBlockBaseline): Replace lastLineBoxBaseline with inlineBlockBaseline.
197         * rendering/RenderFlexibleBox.cpp:
198         (WebCore::synthesizedBaselineFromContentBox): Helper method for getting the baseline from the content box.
199         (WebCore::RenderFlexibleBox::baselinePosition): Always include the margin. This fixes the inline-flexbox case.
200         (WebCore::RenderFlexibleBox::firstLineBoxBaseline): Fix a case where we didn't synthesize a baseline.  Returning -1 means there is no baseline, but we can
201         synthesize a baseline if we have a flexitem without text.
202         (WebCore::RenderFlexibleBox::inlineBlockBaseline):
203         * rendering/RenderFlexibleBox.h:
204         * rendering/RenderTable.cpp: Replace lastLineBoxBaseline with inlineBlockBaseline.
205         (WebCore::RenderTable::inlineBlockBaseline): Try to make comment more direct.
206         * rendering/RenderTable.h:
207         (RenderTable): Replace lastLineBoxBaseline with inlineBlockBaseline.
208
209 2012-10-22  Levi Weintraub  <leviw@chromium.org>
210
211         Unreviewed Chromium build fix following r132074.
212
213         * WebCore.gypi:
214
215 2012-10-22  Mario Sanchez Prada  <msanchez@igalia.com>
216
217         [GTK] Don't use deprecated AccessibilityObject methods after r99502
218         https://bugs.webkit.org/show_bug.cgi?id=99985
219
220         Reviewed by Chris Fleizach.
221
222         Update callers for AccessibilityObject's title() and
223         accessibilityDescription() so they now use AccessibilityText.
224
225         * accessibility/gtk/WebKitAccessibleUtil.cpp:
226         (titleTagShouldBeUsedInDescriptionField): Internal helper function.
227         (accessibilityTitle): New helper function, returns an String with
228         the title for a AccessibilityObject, using AccessibleText.
229         (accessibilityDescription): New helper function, returns an String with
230         the description for a AccessibilityObject, using AccessibleText.
231         * accessibility/gtk/WebKitAccessibleUtil.h: Added public
232         declarations for accessibilityTitle and accessibilityDescription.
233
234         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
235         (webkitAccessibleGetName): Use new helpers for retrieving the title.
236         (webkitAccessibleGetDescription): Use new helpers for retrieving
237         the title and description.
238
239         * accessibility/gtk/WebKitAccessibleInterfaceImage.cpp:
240         (webkitAccessibleImageGetImageDescription): Use new helpers for
241         retrieving the title.
242
243 2012-10-16  Andrey Kosyakov  <caseq@chromium.org>
244
245         Web Inspector: add timeline instrumentation for scrolling of a layer
246         https://bugs.webkit.org/show_bug.cgi?id=99461
247
248         Reviewed by Pavel Feldman.
249
250         - added timeline instrumentation for scrolling of a layer;
251         - added TRACE_EVENT for ScrollableArea::scrollPositionChanged()
252
253         * inspector/InspectorInstrumentation.cpp:
254         (WebCore):
255         (WebCore::InspectorInstrumentation::willScrollLayerImpl):
256         (WebCore::InspectorInstrumentation::didScrollLayerImpl):
257         * inspector/InspectorInstrumentation.h:
258         (InspectorInstrumentation):
259         (WebCore::InspectorInstrumentation::willScrollLayer):
260         (WebCore):
261         (WebCore::InspectorInstrumentation::didScrollLayer):
262         * inspector/InspectorTimelineAgent.cpp:
263         (TimelineRecordType):
264         (WebCore::InspectorTimelineAgent::willScroll):
265         (WebCore):
266         (WebCore::InspectorTimelineAgent::didScroll):
267         * inspector/InspectorTimelineAgent.h:
268         (InspectorTimelineAgent):
269         * inspector/front-end/TimelineModel.js:
270         * inspector/front-end/TimelinePresentationModel.js:
271         (WebInspector.TimelinePresentationModel._initRecordStyles):
272         * rendering/RenderLayer.cpp:
273         (WebCore::RenderLayer::scrollTo):
274         * platform/ScrollableArea.cpp:
275         (WebCore::ScrollableArea::scrollPositionChanged):
276
277 2012-10-22  Jan Keromnes  <janx@linux.com>
278
279         Moved cmdevtools.js to folder cm/
280
281         Web Inspector: Move file `cmdevtools.css` to `cm/`
282         https://bugs.webkit.org/show_bug.cgi?id=99956
283
284         Reviewed by Pavel Feldman.
285
286         The file cmdevtools.js belongs to the CodeMirror editor experiment in cm/.
287
288         * WebCore.gypi:
289         * WebCore.vcproj/WebCore.vcproj:
290         * inspector/front-end/WebKit.qrc:
291         * inspector/front-end/cm/cmdevtools.css: Renamed from Source/WebCore/inspector/front-end/cmdevtools.css.
292         (.CodeMirror):
293         (.CodeMirror-scroll):
294         (.cm-highlight):
295         (@-webkit-keyframes fadeout):
296         (to):
297         (.cm-breakpoint):
298         (.cm-breakpoint-disabled):
299         (.cm-breakpoint-conditional):
300         (.cm-execution-line):
301         (.cm-s-web-inspector-js span.cm-keyword):
302         (.cm-s-web-inspector-js span.cm-number):
303         (.cm-s-web-inspector-js span.cm-comment):
304         (.cm-s-web-inspector-js span.cm-string):
305         (.cm-s-web-inspector-js span.cm-string-2):
306         (.cm-s-web-inspector-css span.cm-keyword):
307         (.cm-s-web-inspector-css span.cm-number):
308         (.cm-s-web-inspector-css span.cm-comment):
309         (.cm-s-web-inspector-css span.cm-string):
310         (.cm-s-web-inspector-css span.cm-string-2):
311         (.cm-s-web-inspector-css span.cm-link):
312         (.cm-s-web-inspector-css span.cm-variable):
313         (.cm-s-web-inspector-html span.cm-meta):
314         (.cm-s-web-inspector-html span.cm-comment):
315         (.cm-s-web-inspector-html span.cm-string):
316         (.cm-s-web-inspector-html span.cm-tag):
317         (.cm-s-web-inspector-html span.cm-attribute):
318         (.cm-s-web-inspector-html span.cm-link):
319         (.webkit-html-message-bubble):
320         (.webkit-html-warning-message):
321         (.webkit-html-error-message):
322         (.webkit-html-message-line):
323         (.webkit-html-message-line-hover):
324
325 2012-10-22  Vsevolod Vlasov  <vsevik@chromium.org>
326
327         Web Inspector: Prepare mappings to moving uiSourceCodes creation out of them to workspace.
328         https://bugs.webkit.org/show_bug.cgi?id=99997
329
330         Reviewed by Pavel Feldman.
331
332         Source mappings could now store a link to temporary uiSourceCodes only.
333         Otherwise it should retrieve uiSourceCodes from workspace by URL.
334         Original uiSourceCodes are now temporary in CompilerScriptMapping.
335
336         * inspector/front-end/CompilerScriptMapping.js:
337         (WebInspector.CompilerScriptMapping):
338         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
339         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
340         (WebInspector.CompilerScriptMapping.prototype._reset):
341         * inspector/front-end/NetworkUISourceCodeProvider.js:
342         (WebInspector.NetworkUISourceCodeProvider):
343         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
344         (WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
345         (WebInspector.NetworkUISourceCodeProvider.prototype._addUISourceCode):
346         (WebInspector.NetworkUISourceCodeProvider.prototype._projectWillReset):
347         * inspector/front-end/SASSSourceMapping.js:
348         (WebInspector.SASSSourceMapping):
349         (_bindUISourceCode):
350         (_reset):
351
352 2012-10-22  Nicolas Dufresne <nicolas.dufresne@collabora.com>
353
354         Gstreamer 1.0 not working
355         https://bugs.webkit.org/show_bug.cgi?id=99852
356
357         Reviewed by Philippe Normand.
358
359         There was a series of trivial issue, g_object_is_floating() was called
360         on type GstCaps (which is not a GObject), webkitGstGetPadCaps() was
361         returning non-fixed caps and GST_MESSAGE_DURATION has been renamed
362         to GST_MESSAGE_DURATION_CHANGED.
363
364         Most failing test passes now.
365
366         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
367         (WTF::adoptGRef):
368         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
369         (webkitGstGetPadCaps):
370         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
371         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
372
373 2012-10-22  Vsevolod Vlasov  <vsevik@chromium.org>
374
375         Web Inspector: Treat dynamic anonymous scripts as other anonymous and fix anonymous script editing and breakpoints.
376         https://bugs.webkit.org/show_bug.cgi?id=99989
377
378         Reviewed by Pavel Feldman.
379
380         Dynamic anonymous scripts are now mapped to anonymous temporary uiSourceCodes.
381         ResourceScriptMapping now supports two types of temporary uiSourceCodes:
382          - original uiSourceCodes represent scripts while main uiSourceCodes are diverged;
383          - temporary uiSourceCodes represent scripts for which resources are not yet loaded.
384
385         * inspector/front-end/BreakpointManager.js:
386         (WebInspector.BreakpointManager.breakpointStorageId):
387         (WebInspector.BreakpointManager.Storage.prototype._updateBreakpoint):
388         * inspector/front-end/NetworkUISourceCodeProvider.js:
389         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
390         * inspector/front-end/ResourceScriptMapping.js:
391         (WebInspector.ResourceScriptMapping):
392         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
393         (WebInspector.ResourceScriptMapping.prototype._hasMergedToVM):
394         (WebInspector.ResourceScriptMapping.prototype.addScript):
395         (WebInspector.ResourceScriptMapping.prototype._deleteOriginalUISourceCodeForScripts):
396         (WebInspector.ResourceScriptMapping.prototype._deleteTemporaryUISourceCodeForScripts):
397         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
398         (WebInspector.ResourceScriptMapping.prototype._createUISourceCode):
399         (WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode):
400         (WebInspector.ResourceScriptMapping.prototype._getOrCreateOriginalUISourceCode):
401         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAddedToWorkspace):
402         (WebInspector.ResourceScriptMapping.prototype._scriptsForUISourceCode.get if):
403         (WebInspector.ResourceScriptMapping.prototype._reset):
404
405 2012-10-22  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
406
407         [css3-text] Add rendering support for -webkit-text-decoration-style
408         https://bugs.webkit.org/show_bug.cgi?id=94094
409
410         Reviewed by Julien Chaffraix.
411
412         This patch implements the "text-decoration-style" property rendering as
413         specified in CSS3 working draft, with "-webkit-" prefix. The specification can
414         be found here: http://dev.w3.org/csswg/css3-text/#text-decoration-style
415
416         Additionally, Mozilla implementation details can be found here:
417         https://developer.mozilla.org/en/CSS/text-decoration-style
418
419         Tests: fast/css3-text/css3-text-decoration/repaint/repaint-text-decoration-style.html
420                fast/css3-text/css3-text-decoration/text-decoration-style.html
421
422         * platform/graphics/GraphicsContext.h:
423         * platform/graphics/cairo/GraphicsContextCairo.cpp:
424         (WebCore::GraphicsContext::setPlatformStrokeStyle):
425         * platform/graphics/cg/GraphicsContextCG.cpp:
426         (WebCore::GraphicsContext::drawLine):
427         * platform/graphics/qt/GraphicsContextQt.cpp:
428         (WebCore::toQPenStyle):
429         (WebCore::GraphicsContext::drawLine):
430         * platform/graphics/skia/PlatformContextSkia.cpp:
431         (WebCore::PlatformContextSkia::setupPaintForStroking):
432         * platform/graphics/wince/GraphicsContextWinCE.cpp:
433         (WebCore::createPen):
434         * platform/graphics/wx/GraphicsContextWx.cpp:
435         (WebCore::strokeStyleToWxPenStyle):
436         Added 'DoubleStroke' and 'WavyStroke' to StrokeStyle enum and updated
437         platform-specific stroke handling. Some styles requires
438         platform-specific implementation (handled in bug 92868).
439         * rendering/InlineTextBox.cpp:
440         (WebCore::InlineTextBox::paint):
441         (WebCore::textDecorationStyleToStrokeStyle): Added static function that
442         translates text decoration to stroke styles.
443         (WebCore::InlineTextBox::paintDecoration): Text decoration style does
444         not specify a property for line thickness (like border-width does for
445         border style), so we statically set it to 1 for now. The 'double' style
446         implementation simply adds a parallel line (depending if it is
447         underline, overline or line-through) and the space between lines follows
448         the approach used by border's 'double' style.
449         * rendering/InlineTextBox.h:
450         (InlineTextBox):
451         * rendering/style/RenderStyle.h:
452         * rendering/style/RenderStyleConstants.h:
453         Added text decoration style rendering support to
454         InlineTextBox::paintDecoration().
455
456 2012-10-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
457
458         [Qt] Use the DNS resolve queue
459         https://bugs.webkit.org/show_bug.cgi?id=99994
460
461         Reviewed by Simon Hausmann.
462
463         Use the DNS resolve queue, to ensure we can prefetch more than just the first 10 hostname encountered
464         during parsing. It also ensure each hostname is only appears once in the queue.
465
466         * Target.pri:
467         * platform/network/qt/DNSQt.cpp: Added.
468         (DnsPrefetchHelper):
469         (WebCore::DnsPrefetchHelper::DnsPrefetchHelper):
470         (WebCore::DnsPrefetchHelper::lookup):
471         (WebCore::DnsPrefetchHelper::lookedUp):
472         (WebCore::prefetchDNS):
473         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
474         (WebCore::DNSResolveQueue::platformResolve):
475         * platform/network/qt/DnsPrefetchHelper.cpp: Removed.
476         * platform/network/qt/DnsPrefetchHelper.h: Removed.
477         (DnsPrefetchHelper):
478
479 2012-10-22  Erik Arvidsson  <arv@chromium.org>
480
481         HTMLBaseElement href attribute binding returns wrong URL
482         https://bugs.webkit.org/show_bug.cgi?id=98184
483
484         Reviewed by Ojan Vafai.
485
486         Resolve the href attribute binding relative to the document URL instead of resolving it to the
487         base element itself. If there is no href attribute this should return the fallback base URL.
488
489         http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-base-element
490
491         Tests: fast/dom/HTMLAnchorElement/set-href-attribute-rebase.html
492                fast/dom/HTMLBaseElement/href-attribute-resolves-with-respect-to-document.html
493
494         * html/HTMLBaseElement.cpp:
495         (WebCore::HTMLBaseElement::href): Don't use completeURL. Resolve href based on document's URL instead
496         of the generic [Reflect, URL] binding.
497         (WebCore::HTMLBaseElement::setHref): Just sets the attribute.
498         * html/HTMLBaseElement.h:
499         * html/HTMLBaseElement.idl: We can no longer use [Reflect, URL]
500
501 2012-10-22  Vsevolod Vlasov  <vsevik@chromium.org>
502
503         Web Inspector: Revisions should not be restored and persisted for anonymous uiSourceCodes.
504         https://bugs.webkit.org/show_bug.cgi?id=99991
505
506         Reviewed by Alexander Pavlov.
507
508         * inspector/front-end/UISourceCode.js:
509         (WebInspector.UISourceCode):
510
511 2012-10-22  Florin Malita  <fmalita@chromium.org>
512
513         Incorrect embedded SVG image sizing on first load
514         https://bugs.webkit.org/show_bug.cgi?id=99489
515
516         Reviewed by Nikolas Zimmermann.
517
518         RenderSVGImage::updateImageViewport() must be called after the image loader is finished,
519         to ensure that a SVGImageCache::SizeAndScalesMap entry is created even if layout has
520         already been performed.
521
522         Test: svg/custom/svg-image-initial-size.html
523
524         * rendering/svg/RenderSVGImage.cpp:
525         (WebCore::RenderSVGImage::imageChanged):
526
527 2012-10-22  Keishi Hattori  <keishi@webkit.org>
528
529         Remove monthFormatInLDML
530         https://bugs.webkit.org/show_bug.cgi?id=99971
531
532         Reviewed by Kent Tamura.
533
534         Removing monthFormatInLDML from localized strings because Localizer class now provides the same functionality.
535
536         No new tests. Just removing unused code.
537
538         * platform/LocalizedStrings.h:
539         (WebCore):
540
541 2012-10-22  Zan Dobersek  <zandobersek@gmail.com>
542
543         [GTK] Enable Microdata DOM API
544         https://bugs.webkit.org/show_bug.cgi?id=99033
545
546         Reviewed by Martin Robinson.
547
548         Enable the Microdata DOM API, but still disable it when the unstable
549         features should be disabled (for instance in release builds).
550
551         No new tests - related tests are being unskipped and are expected to pass.
552
553         * GNUmakefile.am:
554         * GNUmakefile.features.am:
555         * bindings/gobject/GNUmakefile.am: Add the required files so the Microdata
556         API GObject bindings are generated and built.
557
558 2012-10-22  Zan Dobersek  <zandobersek@gmail.com>
559
560         [GTK] Enable CSP 1.1
561         https://bugs.webkit.org/show_bug.cgi?id=99064
562
563         Reviewed by Martin Robinson.
564
565         Enable CSP 1.1 in development builds but keep it disabled when the
566         unstable features should not be enabled (like in stable releases).
567
568         No new tests - they already exist and will be unskipped.
569
570         * GNUmakefile.am:
571         * GNUmakefile.features.am:
572
573 2012-10-22  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
574
575         [Qt] Fix "ASSERTION FAILED: !document->inPageCache()" when loading a page
576         https://bugs.webkit.org/show_bug.cgi?id=98514
577
578         Reviewed by Kenneth Rohde Christiansen.
579
580         The problem is that we call setFixedVisibleContentRect, which triggers
581         a layout, after the document has been put in the page cache and before
582         the load has been actually committed.
583
584         This applies the same trick as with setFixedLayoutSize by passing the rect
585         in Frame::createView and calling setFixedVisibleContentRect before the
586         new FrameView gets attached to the Frame/Document to prevent the layout.
587
588         * WebCore.exp.in:
589         * page/Frame.cpp:
590         (WebCore::Frame::createView): Give a default value to the fixedLayoutSize and
591         useFixedLayout arguments as well since they are used exceptionally.
592         * page/Frame.h:
593         (Frame):
594
595 2012-10-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
596
597         [Qt] Handle GET of blob URLs.
598         https://bugs.webkit.org/show_bug.cgi?id=99053
599
600         Reviewed by Simon Hausmann.
601
602         Let BlobResourceHandle handle Blob request internally.
603
604         * platform/network/qt/ResourceHandleQt.cpp:
605         (WebCore::ResourceHandle::loadResourceSynchronously):
606
607 2012-10-22  Kenichi Ishibashi  <bashi@chromium.org>
608
609         HarfBuzzShaper::shape() should return false when it adds no glyph to GlyphBuffer
610         https://bugs.webkit.org/show_bug.cgi?id=99966
611
612         Reviewed by Kent Tamura.
613
614         If no glyph is added to GlyphBuffer, HarfBuzzShaper::shape() returns false.
615
616         No new tests. Confirmed the fix by using Address Sanitizer.
617
618         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
619         (WebCore::HarfBuzzShaper::shape):
620         (WebCore::HarfBuzzShaper::fillGlyphBuffer): Returns false when glyphBuffer.size() == 0
621         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
622         (HarfBuzzShaper):
623
624 2012-10-22  Shinya Kawanaka  <shinyak@chromium.org>
625
626         [Shadow] ASSERT triggered when we try reprojecting fallback elements.
627         https://bugs.webkit.org/show_bug.cgi?id=99815
628
629         Reviewed by Hajime Morita.
630
631         When fallback elements of InsertionPoint is reprojected, they were attached twice.
632         We have to skip attaching them if they are attached. We also add a few ASSERT not to
633         allow attaching twice if not necessary.
634
635         We have confirmed that this patch does not regress the performance. The summary of the
636         performance test is the following:
637
638         Dromaeo/dom-modify.html [runs/s]:
639                                median stdev    min    max
640            without this patch:   3928   184   3655   4361
641            with this patch   :   3925   178   3652   4350
642
643         Parser/html5-full-render.html [s]:
644                                median stdev    min    max
645            without this patch:   3821    17   3811   3850
646            with this patch   :   3838   4.4   3833   3844
647
648         Test: fast/dom/shadow/content-reprojection-fallback-crash.html
649
650         * dom/ContainerNode.cpp:
651         (WebCore):
652         (WebCore::childAttachedAllowedWhenAttachingChildren): If true, children of this node might
653         be attached in advance because of ShadowDOM attaching process.
654         * dom/ContainerNode.h:
655         (ContainerNode):
656         (WebCore):
657         (WebCore::ContainerNode::attachChildren):
658         * dom/Element.cpp:
659         (WebCore::Element::attach):
660         * dom/ShadowRoot.cpp:
661         (WebCore::ShadowRoot::attach):
662
663 2012-10-22  Pavel Feldman  <pfeldman@chromium.org>
664
665         Web Inspector: merge "docked" state into the "dock side" enum.
666         https://bugs.webkit.org/show_bug.cgi?id=99717
667
668         Reviewed by Vsevolod Vlasov.
669
670         Otherwise, it is hard to manage these inter-dependent flags.
671
672         * WebCore.exp.in:
673         * inspector/InspectorFrontendClient.h:
674         (InspectorFrontendClient):
675         * inspector/InspectorFrontendClientLocal.cpp:
676         (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
677         (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
678         * inspector/InspectorFrontendClientLocal.h:
679         (InspectorFrontendClientLocal):
680         * inspector/InspectorFrontendHost.cpp:
681         (WebCore::InspectorFrontendHost::requestSetDockSide):
682         * inspector/InspectorFrontendHost.h:
683         (InspectorFrontendHost):
684         * inspector/InspectorFrontendHost.idl:
685         * inspector/front-end/DockController.js:
686         (WebInspector.DockController):
687         (WebInspector.DockController.prototype._updateUI.get sides):
688         (WebInspector.DockController.prototype._updateUI):
689         (WebInspector.DockController.prototype._toggleDockState):
690         * inspector/front-end/InspectorFrontendAPI.js:
691         (InspectorFrontendAPI.setAttachedWindow):
692         (InspectorFrontendAPI.setDockSide):
693         * inspector/front-end/InspectorFrontendHostStub.js:
694         (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide):
695         * inspector/front-end/externs.js:
696
697 2012-10-22  MORITA Hajime  <morrita@google.com>
698
699         Unreviewed follow up to update test result after r132033.
700
701         * bindings/scripts/test/V8/V8TestObj.cpp:
702         (WebCore::V8TestObj::installPerContextProperties):
703
704 2012-10-21  MORITA Hajime  <morrita@google.com>
705
706         [V8] V8EnablePerContext shouldn't require document() accessor to the native object.
707         https://bugs.webkit.org/show_bug.cgi?id=99954
708
709         Reviewed by Kentaro Hara.
710
711         It now refers ScriptExecutionContext of the creation context instead of document() of
712         wrapped object.
713
714         No new tests. No behavior change at this time.
715
716         * bindings/scripts/CodeGeneratorV8.pm:
717         (GenerateImplementation):
718
719 2012-10-21  Kent Tamura  <tkent@chromium.org>
720
721         Page popup: Fix crash by events after closing
722         https://bugs.webkit.org/show_bug.cgi?id=99951
723
724         Reviewed by Hajime Morita.
725
726         WebCore should provide a way to uninstall a DOMWindowPagePopup supplement.
727
728         No new tests. The bug is timing-dependent.
729
730         * page/DOMWindowPagePopup.cpp:
731         (WebCore::DOMWindowPagePopup::uninstall):
732         Added. Calls Supplementable::removeSupplement.
733         * page/DOMWindowPagePopup.h:
734         (DOMWindowPagePopup): Declare uninstall.
735         * platform/Supplementable.h:
736         (WebCore::Supplementable::removeSupplement): Added.
737
738 2012-10-21  Keishi Hattori  <keishi@webkit.org>
739
740         Refactor picker tests to fix flakiness and share code
741         https://bugs.webkit.org/show_bug.cgi?id=99671
742
743         Reviewed by Kent Tamura.
744
745         Disable transitions until the picker is fully ready. This should fix flakiness.
746
747         No new tests.
748
749         * Resources/pagepopups/calendarPicker.css:
750         (.preparing .unavailable): Disable transitions.
751         (.preparing .available): Disable transitions.
752         * Resources/pagepopups/calendarPicker.js:
753         (CalendarPicker): Set "preparing" class.
754         (CalendarPicker.prototype._handleWindowResize): Remove the "preparing" class when the window finishes resizing.
755
756 2012-10-21  Shinya Kawanaka  <shinyak@chromium.org>
757
758         Web Inspector: Shadow DOM: Node removal doesn't reflect.
759         https://bugs.webkit.org/show_bug.cgi?id=99567
760
761         Reviewed by Pavel Feldman.
762
763         We have to call InspectorInstrumentation::willRemoveDOMNode() even if a node is in a shadow tree.
764         Otherwise, node won't be removed from the inspector.
765
766         Test: inspector/elements/update-shadowdom.html
767
768         * dom/ContainerNode.cpp:
769         (WebCore::dispatchChildRemovalEvents):
770
771 2012-10-21  Andreas Kling  <kling@webkit.org>
772
773         Remove Page::javaScriptURLsAreAllowed setting.
774         <http://webkit.org/b/99944>
775
776         Reviewed by Anders Carlsson.
777
778         This setting was exposed through internal WebView API in Apple's WebKit1.
779         There are no longer any clients of that API.
780
781         This is a step towards preventing elements from modifying their own attributes
782         below attributeChanged().
783
784         * WebCore.exp.in:
785         * WebCore.order:
786         * bindings/ScriptControllerBase.cpp:
787         (WebCore::ScriptController::executeIfJavaScriptURL):
788         * html/HTMLAnchorElement.cpp:
789         (WebCore::HTMLAnchorElement::parseAttribute):
790         * page/Page.cpp:
791         (WebCore::Page::Page):
792         * page/Page.h:
793         (Page):
794
795 2012-10-21  Hyungchan Kim  <hyungchan2.kim@lge.com>
796
797         Add a separate flag for rgb swizzling whether it can be modified or not
798         https://bugs.webkit.org/show_bug.cgi?id=98728
799
800         BitmapTexture swizzles the source image if the OpenGL driver
801         doesn't support the BGRA extension.
802         In case of directly composited images, the source image should not
803         be modified.
804
805         http://www.satine.org/research/webkit/snowleopard/snowstack.html
806
807         Reviewed by Noam Rosenthal.
808
809         No new tests as this is only testable on specific hardware and
810         currently not avaiable in the bots.
811
812         * platform/graphics/texmap/TextureMapper.h:
813         (BitmapTexture):
814         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
815         (WebCore::TextureMapperTile::updateContents):
816         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
817         (WebCore::TextureMapperTiledBackingStore::updateContents):
818         * platform/graphics/texmap/TextureMapperBackingStore.h:
819         (TextureMapperTile):
820         (TextureMapperTiledBackingStore):
821         (WebCore::TextureMapperTiledBackingStore::updateContents):
822         * platform/graphics/texmap/TextureMapperGL.cpp:
823         (WebCore::TextureMapperGL::drawRepaintCounter):
824         (WebCore::BitmapTextureGL::updateContents):
825         * platform/graphics/texmap/TextureMapperGL.h:
826         (BitmapTextureGL):
827         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
828         (WebCore::BitmapTextureImageBuffer::updateContents):
829         * platform/graphics/texmap/TextureMapperImageBuffer.h:
830         (BitmapTextureImageBuffer):
831         * platform/graphics/texmap/TextureMapperLayer.cpp:
832         (WebCore::TextureMapperLayer::updateBackingStore):
833
834 2012-10-21  Antti Koivisto  <antti@apple.com>
835
836         Factor stylesheet invalidation analysis code into a class
837         https://bugs.webkit.org/show_bug.cgi?id=99933
838
839         Reviewed by Sam Weinig.
840
841         Currently the stylesheet analysis code is all over the place. It should be factored into a class to make
842         further progress easier.
843
844         The patch adds StyleInvalidationAnalysis class and moves a bunch of code from SelectorChecker, StyleResolver
845         and DocumentStyleSheetCollection there. No functional changes.
846
847         * CMakeLists.txt:
848         * GNUmakefile.list.am:
849         * Target.pri:
850         * WebCore.gypi:
851         * WebCore.vcproj/WebCore.vcproj:
852         * WebCore.xcodeproj/project.pbxproj:
853         * css/SelectorChecker.cpp:
854         (WebCore):
855         * css/SelectorChecker.h:
856         (WebCore):
857         * css/StyleInvalidationAnalysis.cpp: Added.
858         (WebCore):
859         (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
860         (WebCore::StyleInvalidationAnalysis::create):
861         (WebCore::determineSelectorScopes):
862         (WebCore::StyleInvalidationAnalysis::analyzeStyleSheet):
863         (WebCore::elementMatchesSelectorScopes):
864         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
865         * css/StyleInvalidationAnalysis.h: Added.
866         (WebCore):
867         (StyleInvalidationAnalysis):
868         (WebCore::StyleInvalidationAnalysis::dirtiesAllStyle):
869         * css/StyleResolver.cpp:
870         (WebCore::StyleResolver::checkRegionSelector):
871         * css/StyleResolver.h:
872         (StyleResolver):
873         * dom/DocumentStyleSheetCollection.cpp:
874         (WebCore):
875         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
876         * dom/DocumentStyleSheetCollection.h:
877         (DocumentStyleSheetCollection):
878
879 2012-10-08  Robert Hogan  <robert@webkit.org>
880
881         In some float situations, the original layout is wrong and only corrects itself on repaint
882         https://bugs.webkit.org/show_bug.cgi?id=18939
883
884         Reviewed by Levi Weintraub.
885
886         A <br> that follows collapsing spaces and has clearance set always needs to get a run and a linebox of its own.
887         This allows the line below it to check for clearance from the <br> if it gets dirtied but the line with the <br>
888         does not.
889
890         Test: fast/block/br-with-clearance-after-collapsing-space.html
891
892         * rendering/RenderBlockLineLayout.cpp:
893         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
894
895 2012-10-08  Robert Hogan  <robert@webkit.org>
896
897         floated element with negative margin causes text wrap bug
898         https://bugs.webkit.org/show_bug.cgi?id=94825
899
900         Reviewed by Levi Weintraub.
901
902         Avoid over-estimating the available width on the line by ensuring that the offset taken to avoid
903         floats on the line is at least as much as the offset given by border, margin and padding. This only
904         happens when a negative margin on the float brings its edge back before the offset
905         given by the border, margin and padding of its parents.
906
907         Test: fast/block/float/float-on-line-obeys-container-padding.html
908
909         * rendering/RenderBlockLineLayout.cpp:
910         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
911
912 2012-10-20  Martin Robinson  <mrobinson@igalia.com>
913
914         Fix 'make dist' for the GTK+ port
915
916         * GNUmakefile.am: Add missing files to the source list.
917         * GNUmakefile.list.am: Ditto.
918
919 2012-10-20  Dan Bernstein  <mitz@apple.com>
920
921         <rdar://problem/12512710> [mac] Text with zero font size renders as 12px sometimes
922         https://bugs.webkit.org/show_bug.cgi?id=99918
923
924         Reviewed by Geoff Garen.
925
926         -[NSFont fontWithName:size:] returns an NSFont of size 12 (the default User Font size) when
927         asked for size 0, and this is what Font::drawGlyphs uses to draw the text.
928
929         Test: fast/text/zero-font-size-2.html
930
931         * platform/graphics/mac/FontMac.mm:
932         (WebCore::Font::drawGlyphs): Added an early return if the size is zero.
933
934 2012-10-20  Andreas Kling  <kling@webkit.org>
935
936         Clean up QualifiedName-as-hash-key scenario.
937         <http://webkit.org/b/99394>
938
939         Reviewed by Anders Carlsson.
940
941         Cache the hash on QualifiedNameImpl after the first time it's computed.
942         This grows QualifiedNameImpl by 4 bytes on 32-bit (no change on 64-bit due to base class padding)
943         which I believe is fine, since QualifiedName is a shared object.
944
945         Add a global nullQName() function that returns a QualifiedName(nullAtom, nullAtom, nullAtom)
946         and use this to implement HashTraits<QualifiedName>::emptyValue(). The old implementation would
947         create a new QualifiedName(nullAtom, nullAtom, nullAtom) each time, which had to be hashed,
948         added to  the global QualifiedName cache, etc.
949
950         Finally, don't have SVGAttributeHashTranslator create a temporary QualifiedName just to compute
951         the hash of a (namespace, prefix, localName) tuple, use QualifiedNameComponents and hashComponents()
952         directly instead.
953
954         Altogether this shaves ~100ms off of the RoboHornet svgresize.html benchmark on my MBP.
955
956         * dom/QualifiedName.cpp:
957         (WebCore::nullQName):
958         (WebCore::QualifiedName::QualifiedNameImpl::computeHash):
959         * dom/QualifiedName.h:
960         (QualifiedNameImpl):
961         (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
962         (WebCore::QualifiedNameHash::hash):
963         * svg/SVGElement.h:
964         (WebCore::SVGAttributeHashTranslator::hash):
965
966 2012-10-20  Yael Aharon  <yael.aharon@intel.com>
967
968         [EFL][AC] Build fix after r131933
969         https://bugs.webkit.org/show_bug.cgi?id=99901
970
971         Reviewed by Kentaro Hara.
972
973         Add ArrayBoundsClamper.cpp to WebCore/CMakeLists.txt.
974
975         No new tests.
976
977         * CMakeLists.txt:
978
979 2012-10-19  Adam Barth  <abarth@webkit.org>
980
981         [V8] V8DOMWrapper should avoid using its document parameter (so we can remove it soon)
982         https://bugs.webkit.org/show_bug.cgi?id=99876
983
984         Reviewed by Kentaro Hara.
985
986         We want to remove the document parameter to instantiateV8Object. There
987         isn't always a Document available, so it doesn't make sense to pass it
988         as a parameter. We're just waiting for a V8 API change so we can still
989         construct Node wrappers quickly.
990
991         This patch removes a use of the document that snuck in. Rather than
992         passing the ScriptExecutionContext around, we get it from the
993         CreationContext of the prototype object (and only when we actually need
994         it).
995
996         * Modules/notifications/NotificationCenter.cpp:
997         * Modules/notifications/NotificationCenter.h:
998         (NotificationCenter):
999         * bindings/scripts/CodeGeneratorV8.pm:
1000         (GenerateHeader):
1001         (GenerateConstructorGetter):
1002         (GenerateImplementation):
1003         (GenerateToV8Converters):
1004         * bindings/v8/V8DOMWindowShell.cpp:
1005         (WebCore::V8DOMWindowShell::installDOMWindow):
1006         * bindings/v8/V8DOMWrapper.cpp:
1007         (WebCore::V8DOMWrapper::instantiateV8Object):
1008         * bindings/v8/V8PerContextData.cpp:
1009         (WebCore::V8PerContextData::createWrapperFromCacheSlowCase):
1010         (WebCore::V8PerContextData::constructorForTypeSlowCase):
1011         * bindings/v8/V8PerContextData.h:
1012         (WebCore::V8PerContextData::createWrapperFromCache):
1013         (WebCore::V8PerContextData::constructorForType):
1014         (V8PerContextData):
1015         * bindings/v8/WorkerContextExecutionProxy.cpp:
1016         (WebCore::WorkerContextExecutionProxy::initializeIfNeeded):
1017         * bindings/v8/WrapperTypeInfo.h:
1018         (WebCore):
1019         (WebCore::WrapperTypeInfo::installPerContextPrototypeProperties):
1020
1021 2012-10-19  Florin Malita  <fmalita@chromium.org>
1022
1023         Incorrect pattern scaling
1024         https://bugs.webkit.org/show_bug.cgi?id=99870
1025
1026         Reviewed by Dirk Schulze.
1027
1028         The pattern space transform scale should reflect the tile_size(user space)
1029         to tile_image_size ratio, instead of tile_size to absolute_tile_size.
1030
1031         Test: svg/custom/pattern-scaling.svg
1032
1033         * rendering/svg/RenderSVGResourcePattern.cpp:
1034         (WebCore::RenderSVGResourcePattern::applyResource):
1035
1036 2012-10-19  Tony Chang  <tony@chromium.org>
1037
1038         RenderFlexibleBox::preferredMainAxisContentExtentForChild can return a negative value
1039         https://bugs.webkit.org/show_bug.cgi?id=97827
1040
1041         Reviewed by Ojan Vafai.
1042
1043         I'm pretty sure this isn't possible (logicalHeight and maxPreferredLogicalWidth should always include
1044         border and padding), so just add an assert.
1045
1046         No new tests, the assert is for code clarity.
1047
1048         * rendering/RenderFlexibleBox.cpp:
1049         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
1050
1051 2012-10-19  Tony Chang  <tony@chromium.org>
1052
1053         Replace calls to updateLogicalHeight with calls to computeLogicalHeight
1054         https://bugs.webkit.org/show_bug.cgi?id=99883
1055
1056         Reviewed by Ojan Vafai.
1057
1058         In RenderBox and RenderBlock, switch to using computeLogicalHeight instead of
1059         saving the old height, calling update logical height, then restoring the old height.
1060
1061         No new tests, this is just a refactoring.
1062
1063         * rendering/RenderBlock.cpp:
1064         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): Simple replace.
1065         * rendering/RenderBox.cpp:
1066         (WebCore::RenderBox::computePercentageLogicalHeight): Adjust for content height.
1067         (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Adjust for content height.
1068         (WebCore::RenderBox::availableLogicalHeightUsing): Adjust for content height.
1069
1070 2012-10-19  Pablo Flouret  <pablof@motorola.com>
1071
1072         Implement setRangeText() on text controls
1073         https://bugs.webkit.org/show_bug.cgi?id=91907
1074
1075         Reviewed by Kent Tamura.
1076
1077         setRangeText() replaces a range of text with some other text, and
1078         adjusts the existing selection according to its parameters.
1079
1080         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-textarea/input-setrangetext
1081
1082         Tests: fast/forms/color/color-setrangetext.html
1083                fast/forms/date/date-setrangetext.html
1084                fast/forms/datetime/datetime-setrangetext.html
1085                fast/forms/datetimelocal/datetimelocal-setrangetext.html
1086                fast/forms/file/file-setrangetext.html
1087                fast/forms/hidden/hidden-setrangetext.html
1088                fast/forms/image/image-setrangetext.html
1089                fast/forms/month/month-setrangetext.html
1090                fast/forms/number/number-setrangetext.html
1091                fast/forms/range/range-setrangetext.html
1092                fast/forms/search/search-setrangetext.html
1093                fast/forms/setrangetext.html
1094                fast/forms/textarea/textarea-setrangetext.html
1095                fast/forms/time/time-setrangetext.html
1096                fast/forms/week/week-setrangetext.html
1097
1098
1099         * bindings/scripts/CodeGeneratorGObject.pm:
1100         (SkipFunction):
1101             The GObject generator doesn't support function overloads, so skip the
1102             version of setRangeText() that has only one argument, its behavior
1103             can be emulated with the four-argument version.
1104
1105         * html/InputType.cpp:
1106         (WebCore::InputType::supportsSelectionAPI):
1107         (WebCore):
1108         * html/InputType.h:
1109         (InputType):
1110             Add supportsSelectionAPI() which indicates whether the various
1111             selection api functions like setRangeText, setSelectionRange, etc.
1112             are supported by this input element.
1113
1114         * html/BaseTextInputType.cpp:
1115         (WebCore::BaseTextInputType::supportsSelectionAPI):
1116         (WebCore):
1117         * html/BaseTextInputType.h:
1118         (BaseTextInputType):
1119             Text-based input types support the selection APIs.
1120
1121         * html/EmailInputType.cpp:
1122         (WebCore::EmailInputType::supportsSelectionAPI):
1123         (WebCore):
1124         * html/EmailInputType.h:
1125         (EmailInputType):
1126             Email inputs don't support the selection APIs.
1127
1128         * html/HTMLInputElement.cpp:
1129         (WebCore::HTMLInputElement::setRangeText):
1130         * html/HTMLInputElement.h:
1131         (HTMLInputElement):
1132             Add a setRangeText override which checks if it should apply to the
1133             input type, and calls the actual implementation on the parent class.
1134         * html/HTMLInputElement.idl:
1135         * html/HTMLTextAreaElement.idl:
1136
1137         * html/HTMLTextFormControlElement.cpp:
1138         (WebCore::HTMLTextFormControlElement::setRangeText):
1139         * html/HTMLTextFormControlElement.h:
1140         (HTMLTextFormControlElement):
1141             setRangeText implementation.
1142
1143
1144 2012-10-19  Luke Macpherson   <macpherson@chromium.org>
1145
1146         Remove HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro in StyleResolver.
1147         https://bugs.webkit.org/show_bug.cgi?id=99782
1148
1149         Reviewed by Sam Weinig.
1150
1151         Removes last usage of HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro, so that in future there will be no temptation
1152         to use it instead of adding a line to StyleBuilder.
1153         Also removes redundant checks for inital and inherit (HANDLE_INHERIT_AND_INTIAL already returns in those cases).
1154         I don't want to move this code into StyleBuilder until the FIXME that is already there is fixed.
1155
1156         Covered by many existing writing mode tests (eg. fast/html/details-writing-mode.html)
1157
1158         * css/StyleResolver.cpp:
1159         (WebCore):
1160         (WebCore::StyleResolver::applyProperty):
1161
1162 2012-10-19  Joshua Bell  <jsbell@chromium.org>
1163
1164         IndexedDB: Hidden indexing events are visible to script via bubbling/capture
1165         https://bugs.webkit.org/show_bug.cgi?id=96566
1166
1167         Reviewed by Tony Chang.
1168
1169         Stop propagation of error events fired at internal indexing requests as a result of
1170         aborting, as they should not be visible to scripts.
1171
1172         Test: storage/indexeddb/index-population.html
1173
1174         * Modules/indexeddb/IDBObjectStore.cpp:
1175         (WebCore::IDBObjectStore::createIndex):
1176         * Modules/indexeddb/IDBRequest.cpp:
1177         (WebCore::IDBRequest::IDBRequest):
1178         (WebCore::IDBRequest::dispatchEvent):
1179         * Modules/indexeddb/IDBRequest.h:
1180         (WebCore::IDBRequest::preventPropagation):
1181         (IDBRequest):
1182
1183 2012-10-19  Simon Fraser  <simon.fraser@apple.com>
1184
1185         Remove .get() calls in assertions as suggested by Darin Adler.
1186         
1187         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1188         (PlatformCALayer::appendSublayer):
1189         (PlatformCALayer::insertSublayer):
1190         (PlatformCALayer::replaceSublayer):
1191
1192 2012-10-19  Simon Fraser  <simon.fraser@apple.com>
1193
1194         Fix a hang when combining tile cache layers with preserve-3d or reflections
1195         https://bugs.webkit.org/show_bug.cgi?id=99890
1196         <rdar://problem/12539560>
1197
1198         Reviewed by Dean Jackson.
1199
1200         The new tile cache code added an updateSublayers() call when switching to/from
1201         tiled layers. This confused later sublayer rebuilding, causing us to attempt to
1202         add a layer as a child of itself, causing a hang in CA.
1203         
1204         Fix by removing all the explicit calls to updateFoo when updating the structural
1205         layer and switching to/from tiled layers. Instead, we set dirty flags, and rely
1206         on the fact that these flag-dirtying functions get called before the later functions
1207         that process those dirty flags. This is assured by some reordering of the update
1208         function calls.
1209         
1210         A final wrinkle is that ensureStructuralLayer() can change the layer that our
1211         parent GraphicsLayer put in its sublayer list. Rather than diddle with that sublayer
1212         list directly like we used to, just call noteSublayersChanged() on the parent, and have
1213         commitLayerChangesAfterSublayers() check the ChildrenChanged and do a second update
1214         of sublayers if necessary (we clear the flag in commitLayerChangesBeforeSublayers(), so
1215         only do this work if a sublayer requested it).
1216         
1217         Tests: compositing/tiling/preserve3d-tiled.html
1218                compositing/tiling/reflected-tiled.html
1219
1220         * platform/graphics/ca/GraphicsLayerCA.cpp:
1221         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1222         (WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):
1223         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
1224         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1225         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1226         (PlatformCALayer::appendSublayer): Add assertion about adding a layer to itself.
1227         (PlatformCALayer::insertSublayer): Ditto.
1228         (PlatformCALayer::replaceSublayer): Ditto.
1229
1230 2012-10-19  Chris Fleizach  <cfleizach@apple.com>
1231
1232         AX: aria-hidden=false does not work as expected
1233         https://bugs.webkit.org/show_bug.cgi?id=98787
1234
1235         Reviewed by Beth Dakin.
1236
1237         ARIA requires that aria-hidden=false override an element's native visibility and include that
1238         node in the AX hierarchy.
1239
1240         To accomplish this we have to allow invisible items to be included, as well as items that
1241         have no renderers associated with them.
1242
1243         Test: accessibility/aria-hidden-negates-no-visibility.html
1244
1245         * accessibility/AXObjectCache.cpp:
1246         (WebCore::AXObjectCache::getOrCreate):
1247         * accessibility/AccessibilityARIAGrid.cpp:
1248         (WebCore::AccessibilityARIAGrid::addTableCellChild):
1249         (WebCore::AccessibilityARIAGrid::addChildren):
1250         * accessibility/AccessibilityARIAGrid.h:
1251         (AccessibilityARIAGrid):
1252         * accessibility/AccessibilityNodeObject.cpp:
1253         (WebCore):
1254        (WebCore::AccessibilityNodeObject::boundingBoxRect):
1255         (WebCore::AccessibilityNodeObject::insertChild):
1256         (WebCore::AccessibilityNodeObject::addChild):
1257         (WebCore::AccessibilityNodeObject::addChildren):
1258         (WebCore::AccessibilityNodeObject::textUnderElement):
1259         * accessibility/AccessibilityNodeObject.h:
1260         (AccessibilityNodeObject):
1261         * accessibility/AccessibilityObject.cpp:
1262         (WebCore::AccessibilityObject::textIteratorBehaviorForTextRange):
1263         (WebCore):
1264         * accessibility/AccessibilityObject.h:
1265         (AccessibilityObject):
1266         (WebCore::AccessibilityObject::addChild):
1267         (WebCore::AccessibilityObject::insertChild):
1268         * accessibility/AccessibilityRenderObject.cpp:
1269         (WebCore):
1270         (WebCore::AccessibilityRenderObject::accessibilityIsIgnoredBase):
1271         (WebCore::AccessibilityRenderObject::addHiddenChildren):
1272         (WebCore::AccessibilityRenderObject::addChildren):
1273         * accessibility/AccessibilityRenderObject.h:
1274         (AccessibilityRenderObject):
1275
1276 2012-10-19  Michael Saboff  <msaboff@apple.com>
1277
1278         Add String version of visitedLinkHash() to properly handle 8-bit URL Strings.
1279         https://bugs.webkit.org/show_bug.cgi?id=99735
1280
1281         Reviewed by Filip Pizlo.
1282
1283         Added String version of visitedLinkHash().  Made speculative addition of visitedLinkHash()
1284         to chromium platform version of LinkHashChromium.cpp.
1285         Changed calls in the form of visitedLinkHash(string.characters(), string.length()) to use the
1286         new form.
1287
1288         No changes to functionality, so no new tests.
1289
1290         * WebCore.exp.in:
1291         * loader/HistoryController.cpp:
1292         (WebCore::addVisitedLink):
1293         * page/PageGroup.cpp:
1294         (WebCore::PageGroup::addVisitedLink):
1295         * platform/LinkHash.cpp:
1296         (WebCore::visitedLinkHashInline):
1297         (WebCore::visitedLinkHash):
1298         * platform/LinkHash.h:
1299         * platform/chromium/LinkHashChromium.cpp:
1300         (WebCore::visitedLinkHash):
1301
1302 2012-10-19  Michael Saboff  <msaboff@apple.com>
1303
1304         String(CFStringRef) should try to converting to an 8 bit string before converting to  16 bit string
1305         https://bugs.webkit.org/show_bug.cgi?id=99794
1306
1307         Reviewed by Filip Pizlo.
1308
1309         Try getting a Latin1 byte string before getting a UTF16 (UChar*) string.
1310
1311         No new test, added 8 bit path.
1312
1313         * platform/text/cf/StringCF.cpp:
1314         (WTF::String::String):
1315
1316 2012-10-19  Dima Gorbik  <dgorbik@apple.com>
1317
1318         Page should be removed from the cache right after restore was called.
1319         https://bugs.webkit.org/show_bug.cgi?id=99737
1320
1321         Reviewed by Brady Eidson.
1322
1323         The pageCache was inconsistent after the restoration for a period of time because the cachedFrame is being nulled,
1324         but the page is still in the Cache. Now the page is being removed from the cache right after the restoration.
1325         This issue was spotted in a custom built application using WebKit and unfortunately there is no way to test this
1326         behavior in LayoutTests. All the current tests that exercise the page cache do pass.
1327
1328         No new tests.
1329
1330         * loader/FrameLoader.cpp:
1331         (WebCore::FrameLoader::commitProvisionalLoad):
1332
1333 2012-10-19  Max Vujovic  <mvujovic@adobe.com>
1334
1335         [WebGL] getUniformLocation fails for uniform array name without array brackets
1336         https://bugs.webkit.org/show_bug.cgi?id=99854
1337
1338         Reviewed by Dean Jackson.
1339
1340         Before this patch, gl.getUniformLocation(program, "array[0]") would return the array
1341         location, but gl.getUniformLocation(program, "array") would not. Now, the latter also
1342         returns the array location.
1343
1344         In the process of adding a check to the following Khronos WebGL conformance test:
1345         conformance/glsl/misc/glsl-long-variable-names.html
1346
1347         * platform/graphics/ANGLEWebKitBridge.cpp:
1348         (WebCore::getSymbolInfo):
1349             Before, we used to check that the symbol size was greater than one to determine that the
1350             symbol was an array. However, this doesn't identify arrays of length one. Now, we check
1351             if the symbol name ends in "[0]", since ANGLE appends this suffix to array symbol
1352             names.
1353             If the symbol is an array, we strip off the "[0]" and add a symbol with just the base
1354             name. We set the isArray flag on the symbol, so we don't lose the information that it is
1355             an array.
1356             Then, we create symbols for each array element like before. However, instead of
1357             replacing the "0" in array[0]" with each index, we take the base name "array" and
1358             append array brackets containing each index (e.g. "array" + "[7]").
1359         * platform/graphics/ANGLEWebKitBridge.h:
1360         (ANGLEShaderSymbol):
1361             Add isArray boolean to ANGLEShaderSymbol. Since array symbols don't end in "[0]"
1362             anymore, this is the only way to identify arrays.
1363
1364 2012-10-19  Csaba Osztrogonác  <ossy@webkit.org>
1365
1366         Unreviewed, rolling out r131915.
1367         http://trac.webkit.org/changeset/131915
1368         https://bugs.webkit.org/show_bug.cgi?id=98787
1369
1370         It broke the build on platforms with \!HAVE(ACCESSIBILITY)
1371
1372         * accessibility/AXObjectCache.cpp:
1373         (WebCore::AXObjectCache::getOrCreate):
1374         (WebCore::AXObjectCache::nodeIsTextControl):
1375         * accessibility/AXObjectCache.h:
1376         (WebCore):
1377         * accessibility/AccessibilityARIAGrid.cpp:
1378         (WebCore::AccessibilityARIAGrid::addChild):
1379         (WebCore::AccessibilityARIAGrid::addChildren):
1380         * accessibility/AccessibilityARIAGrid.h:
1381         (AccessibilityARIAGrid):
1382         * accessibility/AccessibilityNodeObject.cpp:
1383         (WebCore::AccessibilityNodeObject::elementRect):
1384         (WebCore::AccessibilityNodeObject::addChildren):
1385         (WebCore::AccessibilityNodeObject::textUnderElement):
1386         * accessibility/AccessibilityNodeObject.h:
1387         (AccessibilityNodeObject):
1388         * accessibility/AccessibilityObject.cpp:
1389         * accessibility/AccessibilityObject.h:
1390         (AccessibilityObject):
1391         * accessibility/AccessibilityRenderObject.cpp:
1392         (WebCore::textIteratorBehaviorForTextRange):
1393         (WebCore):
1394         (WebCore::AccessibilityRenderObject::accessibilityIsIgnoredBase):
1395         (WebCore::AccessibilityRenderObject::addChildren):
1396         * accessibility/AccessibilityRenderObject.h:
1397         (AccessibilityRenderObject):
1398
1399 2012-10-19  Tony Chang  <tony@chromium.org>
1400
1401         Unreviewed, rolling out r131936.
1402         http://trac.webkit.org/changeset/131936
1403         https://bugs.webkit.org/show_bug.cgi?id=99717
1404
1405         Broke the clang build
1406
1407         * WebCore.exp.in:
1408         * inspector/InspectorFrontendClient.h:
1409         (InspectorFrontendClient):
1410         * inspector/InspectorFrontendClientLocal.cpp:
1411         (WebCore::InspectorFrontendClientLocal::requestAttachWindow):
1412         (WebCore):
1413         (WebCore::InspectorFrontendClientLocal::requestDetachWindow):
1414         (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
1415         * inspector/InspectorFrontendClientLocal.h:
1416         (InspectorFrontendClientLocal):
1417         (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
1418         * inspector/InspectorFrontendHost.cpp:
1419         (WebCore::InspectorFrontendHost::requestAttachWindow):
1420         (WebCore):
1421         (WebCore::InspectorFrontendHost::requestDetachWindow):
1422         (WebCore::InspectorFrontendHost::requestSetDockSide):
1423         * inspector/InspectorFrontendHost.h:
1424         (InspectorFrontendHost):
1425         * inspector/InspectorFrontendHost.idl:
1426         * inspector/front-end/DockController.js:
1427         (WebInspector.DockController):
1428         (WebInspector.DockController.prototype.setDocked):
1429         (WebInspector.DockController.prototype._innerSetDocked.set if):
1430         (WebInspector.DockController.prototype._innerSetDocked):
1431         (WebInspector.DockController.prototype._updateUI.get states):
1432         (WebInspector.DockController.prototype._updateUI):
1433         (WebInspector.DockController.prototype._toggleDockState):
1434         * inspector/front-end/InspectorFrontendAPI.js:
1435         (InspectorFrontendAPI.setAttachedWindow):
1436         (InspectorFrontendAPI.setDockSide):
1437         * inspector/front-end/InspectorFrontendHostStub.js:
1438         (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow):
1439         (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow):
1440         (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide):
1441         * inspector/front-end/externs.js:
1442         (InspectorFrontendHostAPI.prototype.requestAttachWindow):
1443         (InspectorFrontendHostAPI.prototype.requestDetachWindow):
1444
1445 2012-10-09  Martin Robinson  <mrobinson@igalia.com>
1446
1447         REGRESSION (r130699): 5 various fast/ tests started failing
1448         https://bugs.webkit.org/show_bug.cgi?id=98729
1449
1450         Reviewed by Xan Lopez.
1451
1452         Do not try to remove the URL fragment for data URLs. This will likely
1453         just corrupt the URL.
1454
1455         No new tests. This unskips some previously failing tests.
1456
1457         * platform/network/soup/ResourceRequestSoup.cpp:
1458         (WebCore::ResourceRequest::urlStringForSoup): Do nothing for data URLs.
1459
1460 2012-10-19  Simon Fraser  <simon.fraser@apple.com>
1461
1462         Use tile caches in place of CATiledLayer
1463         https://bugs.webkit.org/show_bug.cgi?id=99806
1464         <rdar://problem/6474145>
1465
1466         Reviewed by Tim Horton.
1467
1468         Have GraphicsLayerCA use TileCaches instead of CATiledLayer now for
1469         layers that exceed the 2000px size threshold.
1470
1471         * platform/graphics/TiledBacking.h:
1472         (TiledBacking): Have normal getter and setter for the visible rect.
1473         * platform/graphics/ca/GraphicsLayerCA.cpp:
1474         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): We need
1475         to pass in an old visibleRect to commitLayerChangesBeforeSublayers(). Just use
1476         our current visible rect, which result in no tile area work.
1477         (WebCore::GraphicsLayerCA::computeVisibleRect): Make this const and have it
1478         return the rect, for clarity.
1479         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Keep track of the old
1480         visible rect, and use the change flags mechanism to ensure that we recompute
1481         tile areas later.
1482         When calling commitLayerChangesBeforeSublayers() on the mask layer, just pass
1483         its own visible rect as the old visible rect.
1484         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Pass in the
1485         oldVisibleRect so that updateVisibleRect() can use this to see how the
1486         visibleRect is changing.
1487         (WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect): This member function
1488         compares the old and new visible rects, and extends the tile coverage area
1489         in directions where more content is being exposed. It takes care to avoid
1490         "jitter" in the visible rect deltas causing edge tiles to get created then
1491         destroyed by keeping any extra padding that already exists in a direction
1492         where more content is being exposed.
1493         (WebCore::GraphicsLayerCA::updateVisibleRect): Call adjustTiledLayerVisibleRect()
1494         and use the result to update the TiledBacking's visibleRect.
1495         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Create layers of type
1496         LayerTypeTileCacheLayer instead of LayerTypeWebTiledLayer. Because tile
1497         cache layers involve adding an extra layer to the hierarchy (the tile container),
1498         we call updateSublayerList() when changing layer type.
1499         * platform/graphics/ca/GraphicsLayerCA.h: New m_sizeAtLastVisibleRectUpdate member
1500         that is used to prevent the adjustTiledLayerVisibleRect() logic being confused by
1501         size changes.
1502         (WebCore::GraphicsLayerCA::visibleRect):
1503         * platform/graphics/ca/mac/TileCache.h: Have normal getter and setter for the visible rect.
1504         * platform/graphics/ca/mac/TileCache.mm:
1505         (WebCore::TileCache::setVisibleRect): Renamed to setVisibleRect().
1506         * rendering/RenderLayerCompositor.cpp:
1507         (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Avoid doing work
1508         for pages in the page cache, for which the root layer is unattached.
1509         (WebCore::RenderLayerCompositor::frameViewDidScroll): visibleRectChanged() was renamed
1510         to setVisibleRect().
1511
1512 2012-10-19  Beth Dakin  <bdakin@apple.com>
1513
1514         https://bugs.webkit.org/show_bug.cgi?id=99768
1515         We should limit the tile cache coverage when a page can't take 
1516         advantage of fast tile scrolling anyway
1517
1518         Reviewed by Simon Fraser.
1519
1520         When sites can't use fast-scrolling, there is no need to inflate the 
1521         tile cache. In fact, we get a performance boost by keeping it small 
1522         on painting-intensive sites. 
1523
1524         Instead of just looking a whether or not the FrameView 
1525         canHaveScrollbar(), consult 
1526         shouldUpdateScrollLayerPositionOnMainThread().
1527         * page/FrameView.cpp:
1528         (WebCore::FrameView::performPostLayoutTasks):
1529         * rendering/RenderLayerBacking.cpp:
1530         (WebCore::RenderLayerBacking::RenderLayerBacking):
1531         
1532         Expose shouldUpdateScrollLayerPositionOnMainThread().
1533         * page/scrolling/ScrollingCoordinator.cpp:
1534         (WebCore::ScrollingCoordinator::hasNonLayerFixedObjects):
1535         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionOnMainThread):
1536         (WebCore):
1537         (WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread):
1538         * page/scrolling/ScrollingCoordinator.h:
1539         (ScrollingCoordinator):
1540
1541         Bug fix. Should be bitwise and.
1542         * platform/graphics/ca/mac/TileCache.mm:
1543         (WebCore::TileCache::tileCoverageRect):
1544
1545 2012-10-19  Mark Lam  <mark.lam@apple.com>
1546
1547         Added WTF::StackStats mechanism.
1548         https://bugs.webkit.org/show_bug.cgi?id=99805.
1549
1550         Reviewed by Geoffrey Garen.
1551
1552         Added StackStats probes in layout methods.
1553
1554         * dom/Document.cpp:
1555         (WebCore::Document::updateLayout):
1556         * rendering/RenderBlock.cpp:
1557         (WebCore::RenderBlock::layout):
1558         * rendering/RenderBox.cpp:
1559         (WebCore::RenderBox::layout):
1560         * rendering/RenderDialog.cpp:
1561         (WebCore::RenderDialog::layout):
1562         * rendering/RenderEmbeddedObject.cpp:
1563         (WebCore::RenderEmbeddedObject::layout):
1564         * rendering/RenderFlowThread.cpp:
1565         (WebCore::RenderFlowThread::layout):
1566         * rendering/RenderFrameSet.cpp:
1567         (WebCore::RenderFrameSet::layout):
1568         * rendering/RenderIFrame.cpp:
1569         (WebCore::RenderIFrame::layout):
1570         * rendering/RenderImage.cpp:
1571         (WebCore::RenderImage::layout):
1572         * rendering/RenderListBox.cpp:
1573         (WebCore::RenderListBox::layout):
1574         * rendering/RenderListItem.cpp:
1575         (WebCore::RenderListItem::layout):
1576         * rendering/RenderListMarker.cpp:
1577         (WebCore::RenderListMarker::layout):
1578         * rendering/RenderMedia.cpp:
1579         (WebCore::RenderMedia::layout):
1580         * rendering/RenderObject.cpp:
1581         (WebCore::RenderObject::layout):
1582         * rendering/RenderObject.h:
1583         * rendering/RenderRegion.cpp:
1584         (WebCore::RenderRegion::layout):
1585         * rendering/RenderReplaced.cpp:
1586         (WebCore::RenderReplaced::layout):
1587         * rendering/RenderReplica.cpp:
1588         (WebCore::RenderReplica::layout):
1589         * rendering/RenderRubyRun.cpp:
1590         (WebCore::RenderRubyRun::layoutSpecialExcludedChild):
1591         * rendering/RenderScrollbarPart.cpp:
1592         (WebCore::RenderScrollbarPart::layout):
1593         * rendering/RenderSlider.cpp:
1594         (WebCore::RenderSlider::layout):
1595         * rendering/RenderTable.cpp:
1596         (WebCore::RenderTable::layout):
1597         * rendering/RenderTableCell.cpp:
1598         (WebCore::RenderTableCell::layout):
1599         * rendering/RenderTableRow.cpp:
1600         (WebCore::RenderTableRow::layout):
1601         * rendering/RenderTableSection.cpp:
1602         (WebCore::RenderTableSection::layout):
1603         * rendering/RenderTextControlSingleLine.cpp:
1604         (WebCore::RenderTextControlSingleLine::layout):
1605         * rendering/RenderTextTrackCue.cpp:
1606         (WebCore::RenderTextTrackCue::layout):
1607         * rendering/RenderVideo.cpp:
1608         (WebCore::RenderVideo::layout):
1609         * rendering/RenderView.cpp:
1610         (WebCore::RenderView::layout):
1611         * rendering/RenderWidget.cpp:
1612         (WebCore::RenderWidget::layout):
1613         * rendering/svg/RenderSVGContainer.cpp:
1614         (WebCore::RenderSVGContainer::layout):
1615         * rendering/svg/RenderSVGForeignObject.cpp:
1616         (WebCore::RenderSVGForeignObject::layout):
1617         * rendering/svg/RenderSVGGradientStop.cpp:
1618         (WebCore::RenderSVGGradientStop::layout):
1619         * rendering/svg/RenderSVGHiddenContainer.cpp:
1620         (WebCore::RenderSVGHiddenContainer::layout):
1621         * rendering/svg/RenderSVGImage.cpp:
1622         (WebCore::RenderSVGImage::layout):
1623         * rendering/svg/RenderSVGResourceContainer.cpp:
1624         (WebCore::RenderSVGResourceContainer::layout):
1625         * rendering/svg/RenderSVGResourceMarker.cpp:
1626         (WebCore::RenderSVGResourceMarker::layout):
1627         * rendering/svg/RenderSVGRoot.cpp:
1628         (WebCore::RenderSVGRoot::layout):
1629         * rendering/svg/RenderSVGShape.cpp:
1630         (WebCore::RenderSVGShape::layout):
1631         * rendering/svg/RenderSVGText.cpp:
1632         (WebCore::RenderSVGText::layout):
1633
1634 2012-10-19  Pavel Feldman  <pfeldman@chromium.org>
1635
1636         Web Inspector: merge "docked" state into the "dock side" enum.
1637         https://bugs.webkit.org/show_bug.cgi?id=99717
1638
1639         Reviewed by Vsevolod Vlasov.
1640
1641         Otherwise, it is hard to manage these inter-dependent flags.
1642
1643         * inspector/InspectorFrontendClient.h:
1644         (InspectorFrontendClient):
1645         * inspector/InspectorFrontendClientLocal.cpp:
1646         (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
1647         (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
1648         * inspector/InspectorFrontendClientLocal.h:
1649         (InspectorFrontendClientLocal):
1650         * inspector/InspectorFrontendHost.cpp:
1651         (WebCore::InspectorFrontendHost::requestSetDockSide):
1652         * inspector/InspectorFrontendHost.h:
1653         (InspectorFrontendHost):
1654         * inspector/InspectorFrontendHost.idl:
1655         * inspector/front-end/DockController.js:
1656         (WebInspector.DockController):
1657         (WebInspector.DockController.prototype._updateUI.get sides):
1658         (WebInspector.DockController.prototype._updateUI):
1659         (WebInspector.DockController.prototype._toggleDockState):
1660         * inspector/front-end/InspectorFrontendAPI.js:
1661         (InspectorFrontendAPI.setAttachedWindow):
1662         * inspector/front-end/InspectorFrontendHostStub.js:
1663         (.WebInspector.InspectorFrontendHostStub.prototype.requestSetDockSide):
1664
1665 2012-10-19  Joshua Bell  <jsbell@chromium.org>
1666
1667         [V8] IndexedDB: Crash when lazy-indexing Date keys
1668         https://bugs.webkit.org/show_bug.cgi?id=99860
1669
1670         Reviewed by Adam Barth.
1671
1672         Missing a scope/context needed when digging values out of Date objects
1673         in an indexing callback.
1674
1675         Test: storage/indexeddb/lazy-index-types.html
1676
1677         * bindings/v8/IDBBindingUtilities.cpp:
1678         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
1679
1680 2012-10-18  Dean Jackson  <dino@apple.com>
1681
1682         Shader translator needs option to clamp uniform array accesses in vertex shaders
1683         https://bugs.webkit.org/show_bug.cgi?id=98977
1684         https://code.google.com/p/angleproject/issues/detail?id=49
1685
1686         Reviewed by Alok Priyadarshi and Ken Russell.
1687
1688         WebGL forbids out-of-bounds array access in shaders. Rewrite any shaders to
1689         ensure that non-direct array indexing is clamped to the bounds of the array.
1690
1691         Test: fast/canvas/webgl/array-bounds-clamping.html
1692
1693         * platform/graphics/ANGLEWebKitBridge.cpp:
1694         (WebCore::ANGLEWebKitBridge::compileShaderSource): Pass new compiler option SH_CLAMP_INDIRECT_ARRAY_BOUNDS
1695
1696 2012-10-19  Justin Novosad  <junov@chromium.org>
1697
1698         [Chromium] Reduce memory footprint of canvas pattern object with deferred rendering
1699         https://bugs.webkit.org/show_bug.cgi?id=99856
1700
1701         Reviewed by Stephen White.
1702
1703         Marking internal bitmap copy as immutable to prevent it from being
1704         unnecessarily duplicated in skia by SkBitmapHeap.
1705
1706         No new tests: code path already well covered by existing layout tests 
1707         fast/canvas/canvas-pattern-*
1708
1709         * platform/graphics/skia/PatternSkia.cpp:
1710         (WebCore::Pattern::platformPattern):
1711
1712 2012-10-19  Antti Koivisto  <antti@apple.com>
1713
1714         Maintain a list of active CSS stylesheets
1715         https://bugs.webkit.org/show_bug.cgi?id=99843
1716
1717         Reviewed by Andreas Kling.
1718
1719         Currently we maintain a per-document list of stylesheets that matches what is returned by the StyleSheetList DOM API. 
1720         This list contains both CSS and XSLT stylesheets which internally have basically nothing in common. Maintaining 
1721         a list of active CSS stylesheets separately simplifies code in number of places.
1722
1723         * css/StyleResolver.cpp:
1724         (WebCore::StyleResolver::StyleResolver):
1725         (WebCore::StyleResolver::addStylesheetsFromSeamlessParents):
1726         (WebCore::StyleResolver::appendAuthorStyleSheets):
1727         (WebCore::collectCSSOMWrappers):
1728         * css/StyleResolver.h:
1729         (StyleResolver):
1730         * css/StyleSheetList.cpp:
1731         (WebCore::StyleSheetList::styleSheets):
1732         (WebCore::StyleSheetList::detachFromDocument):
1733         * dom/Document.cpp:
1734         (WebCore::Document::setCompatibilityMode):
1735         * dom/DocumentStyleSheetCollection.cpp:
1736         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
1737         (WebCore::styleSheetsUseRemUnits):
1738         (WebCore::filterEnabledCSSStyleSheets):
1739         (WebCore):
1740         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1741         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
1742         * dom/DocumentStyleSheetCollection.h:
1743         (WebCore::DocumentStyleSheetCollection::styleSheetsForStyleSheetList):
1744         (DocumentStyleSheetCollection):
1745         (WebCore::DocumentStyleSheetCollection::activeAuthorStyleSheets):
1746
1747 2012-09-08  Alpha Lam  <hclam@chromium.org>
1748
1749         [chromium] Implement deferred image decoding
1750         https://bugs.webkit.org/show_bug.cgi?id=94240
1751
1752         Reviewed by Stephen White.
1753
1754         Objectives:
1755
1756         To record image decoding operations during painting and to defer
1757         decoding operations until rasterization.
1758
1759         Rationale:
1760
1761         This is a key feature that enables impl-side painting which requires
1762         fast recording of drawing operations. The existing decode-on-draw
1763         restricts that recording has to block on expensive decoding operations.
1764         This change allows recording of image decoding operations during paint
1765         time.
1766
1767         Design:
1768
1769         Image decoding happens when a BitmapImage is drawn into a
1770         GraphicsContext. When per-tile painting is enabled GraphicsContext
1771         is backed by SkCanvas in recording mode. This SkCanvas records drawing
1772         and image decoding operations to minimize recording time.
1773
1774         An image decoding operation is recorded as a SkPixelRef object
1775         implemented by LazyDecodingPixelRef. This object references raw encoded
1776         data, regions to be decoded and scaling information.
1777
1778         When used in conjunction with per-tile painting this feature defers
1779         image decoding until the SkCanvas referencing the image is rasterized.
1780
1781         Both recording and rasterization happen on the main thread.
1782
1783         Performance Impact:
1784
1785         This feature is enabled by WebKit::setDeferredImageDecodingEnabled()
1786         and does not have an impact when disabled.
1787
1788         This feature is disabled by default.
1789
1790         Upcoming Changes:
1791
1792         1. Implement a full-featured image cache in ImageDecodingStore.
1793         2. Allow rasterization and decoding on impl thread.
1794
1795         Classes Involved:
1796
1797         BitmapImage
1798
1799         BitmapImage is the entry point for deferred image decoding. When
1800         drawing a BitmapImage into a GraphicsContext it makes a request to
1801         create a NativeImageSkia. We substitute the content in NativeImageSkia
1802         such that it is lazily decoded.
1803
1804         DeferredImageDecoder
1805
1806         This is the platform implementation of a image decoder for Chromium.
1807         This is a bridge layer that either delegates calls to the actual
1808         ImageDecoder or create a lazily-decoded SkBitmap and delegates calls
1809         to ImageDecodingStore.
1810
1811         ImageDecodingStore
1812
1813         This object manages all encoded images. It keeps track of encoded
1814         data and the corresponding ImageDecoder for doing actual decoding. It
1815         is also responsible for generating lazily decoded SkBitmaps. This
1816         SkBitmap contains a LazyDecodingPixelRef object which references to an
1817         image entry in ImageDecodingStore.
1818
1819         ScaledImageFragment
1820
1821         A container for a scaled image fragment. In addition to bitmap pixels
1822         it contains information about the ID of the image, scale and clipping.
1823
1824         ImageFrameGenerator
1825
1826         This object is responsible for generating decoded pixels. It is also
1827         a container for encoded image data and corresponding image decoder.
1828
1829         LazyDecodingPixelRef
1830
1831         This object is embedded in a SkBitmap to enable lazy decoding. When
1832         SkBitmap needs to access pixels LazyDecodingPixelRef is locked. It
1833         contains information to locate an image and scaling info, these
1834         information is submitted to ImageDecodingStore to access actual pixels.
1835
1836         Layout tests. There are about 80 tests in this virtual test suite
1837         running this feature in this directory:
1838
1839         platform/chromium/virtual/deferred/fast/images
1840
1841         Unit tests. Added DeferredImageDecoderTest to verify deferred
1842         image decoding behavior.
1843
1844         * WebCore.gypi:
1845         * platform/graphics/ImageSource.cpp:
1846         (WebCore::ImageSource::setData):
1847         * platform/graphics/ImageSource.h:
1848         (WebCore):
1849         (ImageSource):
1850         * platform/graphics/chromium/DeferredImageDecoder.cpp: Added.
1851         (WebCore):
1852         (WebCore::DeferredImageDecoder::DeferredImageDecoder):
1853         (WebCore::DeferredImageDecoder::~DeferredImageDecoder):
1854         (WebCore::DeferredImageDecoder::create):
1855         (WebCore::DeferredImageDecoder::createForTesting):
1856         (WebCore::DeferredImageDecoder::filenameExtension):
1857         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
1858         (WebCore::DeferredImageDecoder::setData):
1859         (WebCore::DeferredImageDecoder::isSizeAvailable):
1860         (WebCore::DeferredImageDecoder::size):
1861         (WebCore::DeferredImageDecoder::frameSizeAtIndex):
1862         (WebCore::DeferredImageDecoder::frameCount):
1863         (WebCore::DeferredImageDecoder::repetitionCount):
1864         (WebCore::DeferredImageDecoder::clearFrameBufferCache):
1865         (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex):
1866         (WebCore::DeferredImageDecoder::frameBytesAtIndex):
1867         * platform/graphics/chromium/DeferredImageDecoder.h: Added.
1868         (WebCore):
1869         (DeferredImageDecoder):
1870         * platform/graphics/chromium/ImageDecodingStore.cpp: Added.
1871         (WebCore::ImageDecodingStore::ImageDecodingStore):
1872         (WebCore):
1873         (WebCore::ImageDecodingStore::~ImageDecodingStore):
1874         (WebCore::ImageDecodingStore::instanceOnMainThread):
1875         (WebCore::ImageDecodingStore::initializeOnMainThread):
1876         (WebCore::ImageDecodingStore::shutdown):
1877         (WebCore::ImageDecodingStore::isLazyDecoded):
1878         (WebCore::ImageDecodingStore::createLazyDecodedSkBitmap):
1879         (WebCore::ImageDecodingStore::resizeLazyDecodedSkBitmap):
1880         (WebCore::ImageDecodingStore::setData):
1881         (WebCore::ImageDecodingStore::lockPixels):
1882         (WebCore::ImageDecodingStore::unlockPixels):
1883         (WebCore::ImageDecodingStore::frameGeneratorBeingDestroyed):
1884         (WebCore::ImageDecodingStore::calledOnValidThread):
1885         (WebCore::ImageDecodingStore::lookupFrameCache):
1886         (WebCore::ImageDecodingStore::deleteFrameCache):
1887         * platform/graphics/chromium/ImageDecodingStore.h: Added.
1888         (WebCore):
1889         (ImageDecodingStore):
1890         (WebCore::ImageDecodingStore::create):
1891         * platform/graphics/chromium/ScaledImageFragment.cpp: Added.
1892         (WebCore):
1893         (WebCore::ScaledImageFragment::~ScaledImageFragment):
1894         (WebCore::ScaledImageFragment::ScaledImageFragment):
1895         (WebCore::ScaledImageFragment::isEqual):
1896         * platform/graphics/chromium/ScaledImageFragment.h: Added.
1897         (WebCore):
1898         (ScaledImageFragment):
1899         (WebCore::ScaledImageFragment::create):
1900         (WebCore::ScaledImageFragment::bitmap):
1901         (WebCore::ScaledImageFragment::isComplete):
1902         * platform/graphics/chromium/ImageFrameGenerator.cpp: Added.
1903         (WebCore):
1904         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
1905         (WebCore::ImageFrameGenerator::~ImageFrameGenerator):
1906         (WebCore::ImageFrameGenerator::decoder):
1907         (WebCore::ImageFrameGenerator::setData):
1908         * platform/graphics/chromium/ImageFrameGenerator.h: Added.
1909         (WebCore):
1910         (ImageFrameGenerator):
1911         (WebCore::ImageFrameGenerator::create):
1912         (WebCore::ImageFrameGenerator::size):
1913         (WebCore::ImageFrameGenerator::imageId):
1914         * platform/graphics/chromium/LazyDecodingPixelRef.cpp: Added.
1915         (WebCore):
1916         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1917         (WebCore::LazyDecodingPixelRef::~LazyDecodingPixelRef):
1918         (WebCore::LazyDecodingPixelRef::isScaled):
1919         (WebCore::LazyDecodingPixelRef::isClipped):
1920         (WebCore::LazyDecodingPixelRef::onLockPixels):
1921         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
1922         (WebCore::LazyDecodingPixelRef::onLockPixelsAreWritable):
1923         * platform/graphics/chromium/LazyDecodingPixelRef.h: Added.
1924         (WebCore):
1925         (LazyDecodingPixelRef):
1926         (WebCore::LazyDecodingPixelRef::frameGenerator):
1927         * platform/graphics/skia/NativeImageSkia.cpp:
1928         (WebCore::NativeImageSkia::resizedBitmap):
1929         * platform/image-decoders/ImageDecoder.h:
1930         (ImageFrame):
1931         (WebCore::ImageFrame::setSkBitmap):
1932         (WebCore::ImageFrame::getSkBitmap):
1933
1934 2012-10-18  Yael Aharon  <yael.aharon@intel.com>
1935
1936         [EFL] GraphicsContext3D::m_renderStyle is not initialized
1937         https://bugs.webkit.org/show_bug.cgi?id=99721
1938
1939         Reviewed by Antonio Gomes.
1940
1941         Initialize GraphicsContext3D::m_renderStyle.
1942
1943         No new tests, no new functionality.
1944
1945         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1946         (WebCore::GraphicsContext3D::GraphicsContext3D):
1947
1948 2012-10-19  Dongwoo Joshua Im  <dw.im@samsung.com>
1949
1950         Rename ENABLE_CSS3_TEXT_DECORATION to ENABLE_CSS3_TEXT
1951         https://bugs.webkit.org/show_bug.cgi?id=99804
1952
1953         Reviewed by Julien Chaffraix.
1954
1955         CSS3 text related properties will be implemented under this flag,
1956         including text decoration, text-align-last, and text-justify.
1957
1958         No new functionality, no new test.
1959
1960         * Configurations/FeatureDefines.xcconfig:
1961         * GNUmakefile.am:
1962         * GNUmakefile.features.am:
1963         * css/CSSComputedStyleDeclaration.cpp:
1964         (WebCore):
1965         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1966         * css/CSSParser.cpp:
1967         (WebCore::CSSParser::parseValue):
1968         (WebCore::CSSParser::addTextDecorationProperty):
1969         (WebCore::CSSParser::parseTextDecoration):
1970         * css/CSSPrimitiveValueMappings.h:
1971         (WebCore):
1972         * css/CSSProperty.cpp:
1973         (WebCore::CSSProperty::isInheritedProperty):
1974         * css/CSSPropertyNames.in:
1975         * css/CSSValueKeywords.in:
1976         * css/StyleBuilder.cpp:
1977         (WebCore::StyleBuilder::StyleBuilder):
1978         * css/StyleResolver.cpp:
1979         (WebCore::StyleResolver::applyProperty):
1980         * rendering/style/RenderStyle.cpp:
1981         (WebCore::RenderStyle::diff):
1982         * rendering/style/RenderStyle.h:
1983         * rendering/style/RenderStyleConstants.h:
1984         (WebCore):
1985         * rendering/style/StyleRareNonInheritedData.cpp:
1986         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1987         (WebCore::StyleRareNonInheritedData::operator==):
1988         * rendering/style/StyleRareNonInheritedData.h:
1989         (StyleRareNonInheritedData):
1990
1991 2012-10-19  Nate Chapin  <japhet@chromium.org>
1992
1993         Reorder some functions in SubresourceLoader to permit main resources
1994         https://bugs.webkit.org/show_bug.cgi?id=99769
1995
1996         Reviewed by Adam Barth.
1997
1998         Most resource types that go through the memory cache (and therefore
1999         through SubresourceLoader) are not sensitive to the exact ordering of
2000         the callbacks they receive, particularly as it relates to ResourceLoadNotifier
2001         calls.  Main resources are not so lenient.  For main resources to be cacheable
2002         and maintain the current behavior as precisely as possible, we will need to
2003         rearrange SubresourceLoader's willSendRequest() and didReceiveData().
2004
2005         No new tests, refactor only.
2006
2007         * loader/SubresourceLoader.cpp:
2008         (WebCore::SubresourceLoader::willSendRequest): There are a series of checks that can result
2009             in the request being canceled, plus calls to CachedResource::willSendRequest() and
2010             ResourceLoader::willSendRequest().  MainResourceLoader (which will be a
2011             CachedResourceClient) has work it expects to do before ResourceLoader::willSendRequest()
2012             is called, but the calls are out of order for that, so swap those.
2013         (WebCore::SubresourceLoader::didReceiveData): We need to populate ResourceLoader::m_resourceData
2014             before notifying CachedResource of new data, but we also want to do CachedResourceClients calls
2015             before calling ResourceLoadNotifier. This means we can't delegate to ResourceLoader.
2016
2017 2012-10-19  Chris Fleizach  <cfleizach@apple.com>
2018
2019         AX: aria-hidden=false does not work as expected
2020         https://bugs.webkit.org/show_bug.cgi?id=98787
2021
2022         Reviewed by Beth Dakin.
2023
2024         ARIA requires that aria-hidden=false override an element's native visibility and include that
2025         node in the AX hierarchy.
2026  
2027         To accomplish this we have to allow invisible items to be included, as well as items that
2028         have no renderers associated with them.
2029
2030         Test: accessibility/aria-hidden-negates-no-visibility.html
2031
2032         * accessibility/AXObjectCache.cpp:
2033         (WebCore::AXObjectCache::getOrCreate):
2034         * accessibility/AccessibilityARIAGrid.cpp:
2035         (WebCore::AccessibilityARIAGrid::addTableCellChild):
2036         (WebCore::AccessibilityARIAGrid::addChildren):
2037         * accessibility/AccessibilityARIAGrid.h:
2038         (AccessibilityARIAGrid):
2039         * accessibility/AccessibilityNodeObject.cpp:
2040         (WebCore):
2041         (WebCore::AccessibilityNodeObject::boundingBoxRect):
2042         (WebCore::AccessibilityNodeObject::insertChild):
2043         (WebCore::AccessibilityNodeObject::addChild):
2044         (WebCore::AccessibilityNodeObject::addChildren):
2045         (WebCore::AccessibilityNodeObject::textUnderElement):
2046         * accessibility/AccessibilityNodeObject.h:
2047         (AccessibilityNodeObject):
2048         * accessibility/AccessibilityObject.cpp:
2049         (WebCore::AccessibilityObject::textIteratorBehaviorForTextRange):
2050         (WebCore):
2051         * accessibility/AccessibilityObject.h:
2052         (AccessibilityObject):
2053         (WebCore::AccessibilityObject::addChild):
2054         (WebCore::AccessibilityObject::insertChild):
2055         * accessibility/AccessibilityRenderObject.cpp:
2056         (WebCore):
2057         (WebCore::AccessibilityRenderObject::accessibilityIsIgnoredBase):
2058         (WebCore::AccessibilityRenderObject::addHiddenChildren):
2059         (WebCore::AccessibilityRenderObject::addChildren):
2060         * accessibility/AccessibilityRenderObject.h:
2061         (AccessibilityRenderObject):
2062
2063 2012-10-19  Tommy Widenflycht  <tommyw@google.com>
2064
2065         MediaStream API: Rename owner to client in MediaStreamDescriptor
2066         https://bugs.webkit.org/show_bug.cgi?id=99593
2067
2068         Reviewed by Adam Barth.
2069
2070         This patch renames owner to client in MediaStreamDescriptor as discussed in #99080.
2071
2072         No new tests needed, covered by existing tests.
2073
2074         * Modules/mediastream/MediaStream.cpp:
2075         (WebCore::MediaStream::MediaStream):
2076         (WebCore::MediaStream::~MediaStream):
2077         * Modules/mediastream/MediaStream.h:
2078         (MediaStream):
2079         * Modules/mediastream/PeerConnection00.cpp:
2080         (WebCore::PeerConnection00::didRemoveRemoteStream):
2081         * Modules/mediastream/RTCPeerConnection.cpp:
2082         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
2083         * platform/mediastream/MediaStreamCenter.cpp:
2084         (WebCore::MediaStreamCenter::endLocalMediaStream):
2085         (WebCore::MediaStreamCenter::addMediaStreamTrack):
2086         (WebCore::MediaStreamCenter::removeMediaStreamTrack):
2087         * platform/mediastream/MediaStreamDescriptor.h:
2088         (WebCore::MediaStreamDescriptorClient::~MediaStreamDescriptorClient):
2089         (WebCore::MediaStreamDescriptor::client):
2090         (WebCore::MediaStreamDescriptor::setClient):
2091         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
2092         (MediaStreamDescriptor):
2093
2094 2012-10-19  Shinya Kawanaka  <shinyak@chromium.org>
2095
2096         Elements assigned to <shadow> should not be reprojected.
2097         https://bugs.webkit.org/show_bug.cgi?id=99680
2098
2099         Reviewed by Dimitri Glazkov.
2100
2101         In the current spec, we don't have shadow reprojection, i.e. elements assigned to <shadow> should not be
2102         reprojected to content. However, we can select them by <shadow>.
2103
2104         Tests: fast/dom/shadow/content-reprojection-complex.html
2105                fast/dom/shadow/content-reprojection-shadow.html
2106                fast/dom/shadow/shadow-reprojection-prohibited.html
2107
2108         * html/shadow/ContentDistributor.cpp:
2109         (WebCore::ContentDistributor::distribute): When a node is <shadow>, we should not add elements assigned to <shadow>
2110         to POOL. Instead, <shadow> itself should be added to POOL.
2111         * html/shadow/HTMLContentElement.h:
2112         (WebCore::isHTMLContentElement):
2113         (WebCore):
2114
2115 2012-10-19  Chris Fleizach  <cfleizach@apple.com>
2116
2117         VO issues with hidden <legend> and last explicitly labelled element within a group <fieldset>
2118         https://bugs.webkit.org/show_bug.cgi?id=96325
2119
2120         Reviewed by Beth Dakin.
2121
2122          When finding a <legend> for accessibility, we need to consider those that are offscreen. This patch
2123          modifies the original findLegend method to take a parameter to determine what should be done.
2124
2125         Test: accessibility/hidden-legend.html
2126
2127         * accessibility/AccessibilityRenderObject.cpp:
2128         (WebCore::AccessibilityRenderObject::titleUIElement):
2129         * rendering/RenderFieldset.cpp:
2130         (WebCore::RenderFieldset::findLegend):
2131         * rendering/RenderFieldset.h:
2132
2133 2012-10-17  Chris Fleizach  <cfleizach@apple.com>
2134
2135         AX: Refactor accessibility name computation so it's more platform independent
2136         https://bugs.webkit.org/show_bug.cgi?id=99502
2137
2138         Reviewed by Beth Dakin.
2139
2140         The current model of determining the accessible text for an object has a lot of Mac biases built in
2141         due to legacy implementation. 
2142
2143         This change categorizes and orders accessibility text based on WAI-ARIA text computation rules and then
2144         allows the platform (only Mac right now) to decide how best to apply that text to its own AX API.
2145         http://www.w3.org/TR/wai-aria/roles#textalternativecomputation
2146
2147         This change tried very hard not to change any test behavior, even though it exposed a number of weird
2148         edge cases where we were treating attributes differently based on element type. 
2149
2150         Future patches will resolve those discrepancies.
2151
2152         * accessibility/AccessibilityImageMapLink.cpp:
2153         (WebCore::AccessibilityImageMapLink::accessibilityText):
2154         * accessibility/AccessibilityImageMapLink.h:
2155         (AccessibilityImageMapLink):
2156         * accessibility/AccessibilityMediaControls.cpp:
2157         (WebCore::AccessibilityMediaControl::accessibilityText):
2158         * accessibility/AccessibilityMediaControls.h:
2159         (AccessibilityMediaControl):
2160         (WebCore::AccessibilityMediaTimeDisplay::isMediaControlLabel):
2161         * accessibility/AccessibilityNodeObject.cpp:
2162         (WebCore::AccessibilityNodeObject::titleElementText):
2163         (WebCore::AccessibilityNodeObject::accessibilityText):
2164         (WebCore::AccessibilityNodeObject::ariaLabeledByText):
2165         (WebCore::AccessibilityNodeObject::alternativeText):
2166         (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
2167         (WebCore::AccessibilityNodeObject::visibleText):
2168         (WebCore::AccessibilityNodeObject::helpText):
2169         (WebCore::AccessibilityNodeObject::ariaDescribedByAttribute):
2170         * accessibility/AccessibilityNodeObject.h:
2171         (AccessibilityNodeObject):
2172         * accessibility/AccessibilityObject.h:
2173         (AccessibilityText):
2174         (WebCore::AccessibilityText::AccessibilityText):
2175         (WebCore::AccessibilityObject::isMediaControlLabel):
2176         (AccessibilityObject):
2177         (WebCore::AccessibilityObject::accessibilityText):
2178         (WebCore::AccessibilityObject::setAccessibleName):
2179         (WebCore::AccessibilityObject::accessibilityDescription):
2180         (WebCore::AccessibilityObject::title):
2181         (WebCore::AccessibilityObject::helpText):
2182         (WebCore::AccessibilityObject::stringValue):
2183         (WebCore::AccessibilityObject::textUnderElement):
2184         (WebCore::AccessibilityObject::text):
2185         (WebCore::AccessibilityObject::textLength):
2186         (WebCore::AccessibilityObject::setRoleValue):
2187         (WebCore::AccessibilityObject::roleValue):
2188         (WebCore::AccessibilityObject::selection):
2189         (WebCore::AccessibilityObject::hierarchicalLevel):
2190         * accessibility/AccessibilityRenderObject.cpp:
2191         * accessibility/AccessibilityRenderObject.h:
2192         (AccessibilityRenderObject):
2193         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2194         (-[WebAccessibilityObjectWrapper titleTagShouldBeUsedInDescriptionField]):
2195         (-[WebAccessibilityObjectWrapper accessibilityTitle]):
2196         (-[WebAccessibilityObjectWrapper accessibilityDescription]):
2197         (-[WebAccessibilityObjectWrapper accessibilityHelpText]):
2198         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2199         * platform/LocalizedStrings.cpp:
2200         (WebCore::localizedMediaControlElementHelpText):
2201
2202 2012-10-19  Kent Tamura  <tkent@chromium.org>
2203
2204         Use Localizer::monthFormat to construct input[type=month] UI
2205         https://bugs.webkit.org/show_bug.cgi?id=99818
2206
2207         Reviewed by Kentaro Hara.
2208
2209         Use an LDML format returned by Localizer::monthFormat for
2210         input[type=month] UI.
2211
2212         Because the format may contain symbolic month names and symbolic
2213         stand-alone month names, we need to add:
2214          - Symbolic/numeric detection in DateTimeEditBuilder
2215          - Normal/stand-alone detection in DateTimeEditBuilder
2216          - Symbolic edit field for months
2217
2218         Test: fast/forms/month-multiple-fields/month-multiple-fields-appearance-l10n.html,
2219               fast/forms/month-multiple-fields/month-multiple-fields-keyboard-events.html
2220
2221         * html/MonthInputType.cpp:
2222         (WebCore::MonthInputType::setupLayoutParameters):
2223         Use Localizer::monthFormat.
2224
2225         * html/shadow/DateTimeEditElement.cpp:
2226         (WebCore::DateTimeEditBuilder::visitField):
2227         - If the number of continuous field character is greater than 2, use
2228         DateTimeSymbolicMonthFieldElement.
2229         - Supports stand-alone month field.
2230
2231         * html/shadow/DateTimeFieldElements.h:
2232         (DateTimeSymbolicMonthFieldElement): Added. A subclass of DateTimeSymbolicFieldElement.
2233         * html/shadow/DateTimeFieldElements.cpp:
2234         (WebCore::DateTimeSymbolicMonthFieldElement::DateTimeSymbolicMonthFieldElement):
2235         Added.
2236         (WebCore::DateTimeSymbolicMonthFieldElement::create): Added.
2237         (WebCore::DateTimeSymbolicMonthFieldElement::populateDateTimeFieldsState):
2238         We need to add 1 because the internal integer representation is 0-based
2239         and DateTimeFieldsState uses 1-based month.
2240         (WebCore::DateTimeSymbolicMonthFieldElement::setValueAsDate):
2241         DateComponents::month is 0-based.
2242         (WebCore::DateTimeSymbolicMonthFieldElement::setValueAsDateTimeFieldsState):
2243         We need to subtract 1 because the internal integer representation is 0-based
2244         and DateTimeFieldsState uses 1-based month.
2245
2246         * html/shadow/DateTimeSymbolicFieldElement.h:
2247         (WebCore::DateTimeSymbolicFieldElement::symbolsSize):
2248         Added for DateTimeSymbolicMonthFieldElement::setValueAsDateTimeFieldsState.
2249
2250 2012-10-19  Vsevolod Vlasov  <vsevik@chromium.org>
2251
2252         Web Inspector: inspector/styles/styles-history.html is failing Text on Windows and Linux
2253         https://bugs.webkit.org/show_bug.cgi?id=99519
2254
2255         Reviewed by Alexander Pavlov.
2256
2257         Extracted _styleContentSet callback in a class method to make it sniffable by tests.
2258
2259         * inspector/front-end/StylesSourceMapping.js:
2260         (WebInspector.StyleFile.prototype._commitIncrementalEdit):
2261         (WebInspector.StyleFile.prototype._styleContentSet):
2262
2263 2012-10-19  Pavel Feldman  <pfeldman@chromium.org>
2264
2265         Web Inspector: add object-src 'none' to the inspector.html
2266         https://bugs.webkit.org/show_bug.cgi?id=99728
2267
2268         Reviewed by Vsevolod Vlasov.
2269
2270         * inspector/front-end/inspector.html:
2271
2272 2012-10-19  Vsevolod Vlasov  <vsevik@chromium.org>
2273
2274         Web Inspector: Get rid of isSnippetEvaluation flag on UISourceCode
2275         https://bugs.webkit.org/show_bug.cgi?id=99823
2276
2277         Reviewed by Yury Semikhatsky.
2278
2279         Replaced isSnippetEvaluation flag with a pair of isSnippet and isTemporary set.
2280
2281         * inspector/front-end/ResourceScriptMapping.js:
2282         (WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode):
2283         * inspector/front-end/ScriptSnippetModel.js:
2284         (WebInspector.ScriptSnippetModel.prototype._releasedUISourceCodes):
2285         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
2286         * inspector/front-end/ScriptsNavigator.js:
2287         (WebInspector.ScriptsNavigator.prototype._snippetsNavigatorViewForUISourceCode):
2288         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
2289         * inspector/front-end/ScriptsPanel.js:
2290         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2291         * inspector/front-end/Workspace.js:
2292         (WebInspector.Project.prototype.addTemporaryUISourceCode):
2293
2294 2012-10-19  Alexander Pavlov  <apavlov@chromium.org>
2295
2296         Web Inspector: Invalid Regex in SASSSourceMapping/didRequestContent, breaks Support for Sass experiment
2297         https://bugs.webkit.org/show_bug.cgi?id=99729
2298
2299         Reviewed by Vsevolod Vlasov.
2300
2301         Decode only the first line number digit written in a six-character escaped Unicode format.
2302
2303         * inspector/front-end/SASSSourceMapping.js:
2304         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
2305         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
2306
2307 2012-10-19  Tommy Widenflycht  <tommyw@google.com>
2308
2309         MediaStream API: Update the RuntimeEnabledFeatures flags
2310         https://bugs.webkit.org/show_bug.cgi?id=99714
2311
2312         Reviewed by Adam Barth.
2313
2314         Updating the RuntimeEnabledFeatures flags to match reality:
2315         isMediaStreamEnabled and isPeerConnectionEnabled should be true by default and
2316         isDeprecatedPeerConnectionEnabled false.
2317
2318         Patch covered by existing tests.
2319
2320         * bindings/generic/RuntimeEnabledFeatures.cpp:
2321         (WebCore):
2322
2323 2012-10-19  Adam Barth  <abarth@webkit.org>
2324
2325         [V8] Simplify GCPrologueVisitor
2326         https://bugs.webkit.org/show_bug.cgi?id=99819
2327
2328         Reviewed by Kentaro Hara.
2329
2330         Previously, GCPrologueVisitor used a complicated traits-based template
2331         design. That's not necessary. We can just implement it directly without
2332         template magic.
2333
2334         The one subtly here is that MessagePort is not actually a subclass of
2335         ActiveDOMObject. The next stage of this cleanup is to make MessagePort
2336         inherit from ActiveDOMObject and remove this special case entirely.
2337
2338         * bindings/v8/V8GCController.cpp:
2339         (WebCore::EnsureWeakDOMNodeVisitor::visitDOMWrapper):
2340         (WebCore):
2341         (WebCore::ActiveDOMObjectPrologueVisitor::visitDOMWrapper):
2342         (WebCore::NodeVisitor::visitDOMWrapper):
2343         (WebCore::V8GCController::gcPrologue):
2344
2345 2012-10-19  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2346
2347         Web Inspector: Saving HAR, snapshots and timeline data do not work in remote debugging mode
2348         https://bugs.webkit.org/show_bug.cgi?id=99179
2349
2350         Reviewed by Yury Semikhatsky.
2351
2352         Added method "close" to InspectorFrontendHost.
2353         Symantically, this method forces to flush all unsaved buffers for
2354         specified file. In native implementation this turns to be no-op.
2355
2356         In stub implementation "close" causes compilation of blob object an
2357         navigating to blob-schema url.
2358
2359         Removed "canAppend", as appending in now suppurted
2360         by all implementations.
2361
2362         Repaced schema "data" with "blob" in InspectorFrontendHostStub "save"
2363         to avoid out-of-memory errors.
2364
2365         * inspector/InspectorFrontendHost.cpp:
2366         (WebCore::InspectorFrontendHost::close): Compiles blob object and
2367         navigates to blob-object url.
2368         (WebCore):
2369         * inspector/InspectorFrontendHost.h: Added "close" method.
2370         * inspector/InspectorFrontendHost.idl: Ditto.
2371         * inspector/front-end/FileManager.js:
2372         (WebInspector.FileManager.prototype.close): Proxy to InspectorFrontend.
2373         * inspector/front-end/FileUtils.js:
2374         (WebInspector.FileOutputStream.prototype.close):
2375         Invoke "close" on FileManager.
2376         (WebInspector.FileOutputStream.prototype._onAppendDone): Ditto.
2377         * inspector/front-end/HandlerRegistry.js: Added mandatory "close" call.
2378         * inspector/front-end/HeapSnapshotView.js:
2379         (WebInspector.HeapProfileHeader.prototype.canSaveToFile): Fixed check.
2380         * inspector/front-end/InspectorFrontendHostStub.js:
2381         (.WebInspector.InspectorFrontendHostStub):
2382         Added "appendable" behaviour emulation.
2383         * inspector/front-end/SourceFrame.js: Added mandatory "close" call.
2384         * inspector/front-end/externs.js: Replaced "canAppend" with "close"
2385
2386 2012-10-18  Dominic Mazzoni  <dmazzoni@google.com>
2387
2388         AX: labelForElement is slow when there are a lot of DOM elements
2389         https://bugs.webkit.org/show_bug.cgi?id=97825
2390
2391         Reviewed by Ryosuke Niwa.
2392
2393         Adds a DocumentOrderedMap to TreeScope that allows accessibility to
2394         quickly map from an id to the label for that id. This speeds up
2395         AccessibilityNode::labelForElement, which was a bottleneck in Chromium
2396         when accessibility was on.
2397
2398         Tests: accessibility/title-ui-element-correctness.html
2399                perf/accessibility-title-ui-element.html
2400
2401         * accessibility/AccessibilityNodeObject.cpp:
2402         (WebCore::AccessibilityNodeObject::labelForElement):
2403         * dom/DocumentOrderedMap.cpp:
2404         (WebCore::keyMatchesLabelForAttribute):
2405         (WebCore):
2406         (WebCore::DocumentOrderedMap::get):
2407         (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
2408         * dom/DocumentOrderedMap.h:
2409         (DocumentOrderedMap):
2410         * dom/Element.cpp:
2411         (WebCore::Element::insertedInto):
2412         (WebCore::Element::removedFrom):
2413         (WebCore::Element::updateLabel):
2414         (WebCore):
2415         (WebCore::Element::willModifyAttribute):
2416         * dom/Element.h:
2417         (Element):
2418         * dom/TreeScope.cpp:
2419         (WebCore::TreeScope::TreeScope):
2420         (WebCore::TreeScope::destroyTreeScopeData):
2421         (WebCore::TreeScope::addLabel):
2422         (WebCore):
2423         (WebCore::TreeScope::removeLabel):
2424         (WebCore::TreeScope::labelElementForId):
2425         * dom/TreeScope.h:
2426         (WebCore):
2427         (TreeScope):
2428         (WebCore::TreeScope::shouldCacheLabelsByForAttribute):
2429
2430 2012-10-19  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2431
2432         Web Inspector: Update localizedStrings.js
2433         https://bugs.webkit.org/show_bug.cgi?id=99701
2434
2435         Reviewed by Yury Semikhatsky.
2436
2437         Fixed most of missing strings and orphans.
2438
2439         * English.lproj/localizedStrings.js:
2440         * inspector/front-end/SettingsScreen.js:
2441
2442 2012-10-17  Ilya Tikhonovsky  <loislo@chromium.org>
2443
2444         Web Inspector: NMI provide data for mixing with tcmalloc heap dumps.
2445         https://bugs.webkit.org/show_bug.cgi?id=99457
2446
2447         Reviewed by Yury Semikhatsky.
2448
2449         countObjectSize now accepts ptr as the first argument and saves it into HashMap if the binary was ran with HEAPPROFILE env variable.
2450         getProcessMemoryDistribution does snapshot and calls the downstream code with the map of counted objects.
2451
2452         * inspector/InspectorClient.h:
2453         (WebCore::InspectorClient::dumpUncountedAllocatedObjects):
2454         * inspector/InspectorMemoryAgent.cpp:
2455         (WebCore::reportJSHeapInfo):
2456         (WebCore::reportRenderTreeInfo):
2457         (WebCore):
2458         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2459         * inspector/MemoryInstrumentationImpl.cpp:
2460         (WebCore::MemoryInstrumentationClientImpl::countObjectSize):
2461         (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage):
2462         * inspector/MemoryInstrumentationImpl.h:
2463         (MemoryInstrumentationClientImpl):
2464         (WebCore::MemoryInstrumentationClientImpl::countedObjects):
2465
2466 2012-10-19  Adam Barth  <abarth@webkit.org>
2467
2468         [V8] DOMObjectVisitor does nothing
2469         https://bugs.webkit.org/show_bug.cgi?id=99812
2470
2471         Reviewed by Kentaro Hara.
2472
2473         This code doesn't do anything, even in Debug! We should just remove it.
2474
2475         * bindings/v8/V8GCController.cpp:
2476         (WebCore):
2477         (WebCore::V8GCController::gcPrologue):
2478         (WebCore::V8GCController::gcEpilogue):
2479
2480 2012-10-19  Adam Barth  <abarth@webkit.org>
2481
2482         [V8] Remove unused typedef from V8GCController.cpp
2483         https://bugs.webkit.org/show_bug.cgi?id=99808
2484
2485         Reviewed by Kentaro Hara.
2486
2487         This typedef is not used.
2488
2489         * bindings/v8/V8GCController.cpp:
2490
2491 2012-10-18  Alexander Pavlov  <apavlov@chromium.org>
2492
2493         Web Inspector: [Styles] Property considered overridden if it is non-inherited important property in inherited style
2494         https://bugs.webkit.org/show_bug.cgi?id=99720
2495
2496         Reviewed by Yury Semikhatsky.
2497
2498         Non-inherited properties are now disregarded in inherited styles.
2499
2500         * inspector/front-end/StylesSidebarPane.js:
2501         (WebInspector.StylesSidebarPane.prototype._refreshStyleRules):
2502         (WebInspector.StylesSidebarPane.prototype._markUsedProperties):
2503
2504 2012-10-18  Adam Barth  <abarth@webkit.org>
2505
2506         [V8] GrouperVisitor is secretly two entirely separate objects
2507         https://bugs.webkit.org/show_bug.cgi?id=99810
2508
2509         Reviewed by Kentaro Hara.
2510
2511         We can separate out the two things that GrouperVisitor is trying to do
2512         because they have nothing to do with each other.
2513
2514         * bindings/v8/V8GCController.cpp:
2515         (ObjectVisitor):
2516         (WebCore::ObjectVisitor::visitDOMWrapper):
2517         (WebCore):
2518         (WebCore::V8GCController::gcPrologue):
2519
2520 2012-10-18  Kiran Muppala  <cmuppala@apple.com>
2521
2522         Automatically start plugins created within a user gesture, skipping snapshotting
2523         https://bugs.webkit.org/show_bug.cgi?id=99778
2524
2525         Reviewed by Alexey Proskuryakov.
2526
2527         If a user gesture is being processed, do not set the display state of
2528         HTMLPluginImageElement to WaitingForSnapshot.
2529
2530         No new tests, since it only affects when plugins switch from snapshot to running
2531         state.  Does not affect rendering of other elements.
2532
2533         * html/HTMLPlugInImageElement.cpp:
2534         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2535
2536 2012-10-18  Kent Tamura  <tkent@chromium.org>
2537
2538         Add shortMonthLabels and shortStandAloneMonthLabels to Localizer
2539         https://bugs.webkit.org/show_bug.cgi?id=99787
2540
2541         Reviewed by Kentaro Hara.
2542
2543         This is going to be used for input[type=month] UI. This doesn't affect
2544         any bahevior yet.
2545
2546         Tests: Add some tests to Source/WebKit/chromium/tests/, and will add
2547         layout tests later.
2548
2549         * platform/text/Localizer.h:
2550         (Localizer): Add shortMonthLabels and shortStandAloneMonthLabels as pure
2551         virtual member functions.
2552
2553         * platform/text/LocaleICU.h:
2554         (LocaleICU): Declare shortMonthLabels and shortStandAloneMonthLabels.
2555         * platform/text/LocaleICU.cpp:
2556         (WebCore::LocaleICU::shortMonthLabels): Added.
2557         (WebCore::LocaleICU::shortStandAloneMonthLabels): Added.
2558
2559         * platform/text/LocaleNone.cpp:
2560         (LocaleNone): Declare shortMonthLabels and shortStandAloneMonthLabels.
2561         (WebCore::LocaleNone::shortMonthLabels):
2562         Added. Always returns English labels.
2563         (WebCore::LocaleNone::shortStandAloneMonthLabels):
2564         Addes. Just calls shortMonthLabels.
2565
2566         * platform/text/LocaleWin.h:
2567         (LocaleWin): Declare shortMonthLabels and shortStandAloneMonthLabels.
2568         * platform/text/LocaleWin.cpp:
2569         (WebCore::LocaleWin::shortMonthLabels): Added.
2570         (WebCore::LocaleWin::shortStandAloneMonthLabels):
2571         Added. Always returns shortMonthLabels.
2572
2573         * platform/text/mac/LocaleMac.h:
2574         (LocaleMac): Declare shortMonthLabels and shortStandAloneMonthLabels.
2575         * platform/text/mac/LocaleMac.mm:
2576         (WebCore::LocaleMac::shortMonthLabels): Added.
2577         (WebCore::LocaleMac::shortStandAloneMonthLabels): Added.
2578
2579 2012-10-18  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2580
2581         Implement value sanitization algorithm for type=datetime
2582         https://bugs.webkit.org/show_bug.cgi?id=76893
2583
2584         Reviewed by Kent Tamura.
2585
2586         Implement the value sanitization algorithm for type=datetime that adjusts
2587         the value to a valid normalized forced-UTC global date and time string.
2588         See http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#valid-normalized-forced-utc-global-date-and-time-string
2589
2590         Test: fast/forms/datetime/datetime-value-sanitization.html
2591
2592         * html/DateTimeInputType.cpp:
2593         (WebCore::DateTimeInputType::sanitizeValue): Implemented.
2594         (WebCore):
2595         * html/DateTimeInputType.h:
2596         (DateTimeInputType): Add sanitizeValue.
2597         * platform/DateComponents.cpp:
2598         (WebCore::DateComponents::addMinute): Fixed a bug that caused wrong adjustment
2599         of timezone offset (e.g. 2012-10-17T01:00+01:00 -> 2012-10-17T01:-60Z).
2600
2601 2012-10-18  Byungwoo Lee  <bw80.lee@samsung.com>
2602
2603         Fix build warning.
2604         https://bugs.webkit.org/show_bug.cgi?id=99788
2605
2606         Reviewed by Kentaro Hara.
2607
2608         Use UNUSED_PARAM macro for removing -Wunused-parameter.
2609
2610         * rendering/RenderLayer.cpp:
2611         (WebCore::RenderLayer::currentTransform):
2612
2613 2012-10-18  Benjamin Poulain  <bpoulain@apple.com>
2614
2615         [WK2] WebKit2 does not build without PLUGIN_PROCESS on Mac
2616         https://bugs.webkit.org/show_bug.cgi?id=99771
2617
2618         Reviewed by Anders Carlsson.
2619
2620         * WebCore.exp.in: The symbol is used by WebCore Test Support, move it
2621         to the general section.
2622
2623 2012-10-18  Adam Barth  <abarth@webkit.org>
2624
2625         [V8] fast/dom/gc-9.html fails for document.styleSheets
2626         https://bugs.webkit.org/show_bug.cgi?id=99786
2627
2628         Reviewed by Kentaro Hara.
2629
2630         V8 needs to know about this IDL attribute as well.
2631
2632         * css/StyleSheetList.idl:
2633
2634 2012-10-18  Adam Barth  <abarth@webkit.org>
2635
2636         [V8] fast/dom/gc-9.html fails for document.implementation
2637         https://bugs.webkit.org/show_bug.cgi?id=99783
2638
2639         Reviewed by Kentaro Hara.
2640
2641         In order to correctly manage the lifetime of document.implementation,
2642         we need to implement GenerateIsReachable=ImplDocument.
2643
2644         * bindings/scripts/CodeGeneratorV8.pm:
2645         (GenerateVisitDOMWrapper):
2646         * bindings/scripts/IDLAttributes.txt:
2647         * dom/DOMImplementation.idl:
2648
2649 2012-10-18  Chris Fleizach  <cfleizach@apple.com>
2650
2651         AX: Crashes in WebProcess at com.apple.WebCore: -[AccessibilityObjectWrapper remoteAccessibilityParentObject] + 78
2652         https://bugs.webkit.org/show_bug.cgi?id=96443
2653
2654         Reviewed by Beth Dakin.
2655
2656         Separate out the chain of calls so that the number of times document() is called is reduced and it will be easier
2657         to determine which line this crash is happening on.
2658
2659         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2660         (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
2661
2662 2012-10-18  Alec Flett  <alecflett@chromium.org>
2663
2664         IndexedDB: Refactor IDBDatabaseBackendImpl to use IDBDatabaseMetadata
2665         https://bugs.webkit.org/show_bug.cgi?id=99773
2666
2667         Reviewed by Tony Chang.
2668
2669         Refactor to begin separating out metadata from stateful backend objects,
2670         in preparation for https://bugs.webkit.org/show_bug.cgi?id=99774.
2671
2672         Also includes some #include dependency cleanup so that the backing store
2673         depends less on the stateful backend objects.
2674
2675         No new tests as this is purely a refactor.
2676
2677         * Modules/indexeddb/IDBBackingStore.h:
2678         (WebCore):
2679         (IDBBackingStore):
2680         * Modules/indexeddb/IDBCursor.h:
2681         * Modules/indexeddb/IDBCursorBackendImpl.h:
2682         (WebCore):
2683         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2684         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
2685         (WebCore::IDBDatabaseBackendImpl::openInternal):
2686         (WebCore::IDBDatabaseBackendImpl::metadata):
2687         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
2688         (WebCore::IDBDatabaseBackendImpl::setVersion):
2689         (WebCore::IDBDatabaseBackendImpl::setVersionInternal):
2690         (WebCore::IDBDatabaseBackendImpl::setIntVersionInternal):
2691         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
2692         (WebCore::IDBDatabaseBackendImpl::openConnection):
2693         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
2694         (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
2695         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
2696         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
2697         (WebCore::IDBDatabaseBackendImpl::resetVersion):
2698         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2699         (WebCore::IDBDatabaseBackendImpl::id):
2700         (IDBDatabaseBackendImpl):
2701         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2702         (WebCore::IDBLevelDBBackingStore::getIDBDatabaseMetaData):
2703         (WebCore::IDBLevelDBBackingStore::deleteDatabase):
2704         * Modules/indexeddb/IDBLevelDBBackingStore.h:
2705         (IDBLevelDBBackingStore):
2706         * Modules/indexeddb/IDBObjectStoreBackendInterface.h:
2707         * Modules/indexeddb/IDBTransaction.h:
2708         (WebCore):
2709
2710 2012-10-18  Peter Kasting  <pkasting@google.com>
2711
2712         [Skia] Set m_hasAlpha correctly in ImageFrame::copyBitmapData.
2713         https://bugs.webkit.org/show_bug.cgi?id=99781
2714
2715         Reviewed by Adam Barth.
2716
2717         No tests, since the actual effects of this bug are fickle and it's not
2718         clear how to extract and check particular subframes of an animated GIF.
2719
2720         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
2721         (WebCore::ImageFrame::copyBitmapData):
2722
2723 2012-10-18  Pan Deng  <pan.deng@intel.com>
2724
2725         [Resource Timing]Implementation of resource timing buffer size restriction functionality
2726         https://bugs.webkit.org/show_bug.cgi?id=84885.
2727
2728         Reviewed by Tony Gentilcore.
2729
2730         http://www.w3.org/TR/2012/CR-resource-timing-20120522/
2731         This patch enable functionality of set buffer size(default is 150 as spec). When buffer is full, resourceTimingBufferFull event will be fired. Incoming entries will be dropped if no more space for them. 
2732
2733         Tests: http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_populate_entries.html
2734                http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_full_when_shrink_buffer_size.html
2735                http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_buffer_size_restriction.html
2736                http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_clear_resource_timing_functionality.html
2737                http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_on_shrink_buffer_size.html
2738                http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_store_and_clear_during_callback.html
2739
2740         * page/Performance.cpp:
2741         (WebCore):
2742         (WebCore::Performance::Performance):
2743         (WebCore::Performance::webkitSetResourceTimingBufferSize):
2744         (WebCore::Performance::addResourceTiming):
2745         (WebCore::Performance::isResourceTimingBufferFull):
2746         * page/Performance.h:
2747         (Performance):
2748
2749 2012-10-18  Ryosuke Niwa  <rniwa@webkit.org>
2750
2751         REGRESSION(r130411): Copying & pasting the first line of text can move caret to the end of text area
2752         https://bugs.webkit.org/show_bug.cgi?id=99663
2753
2754         Reviewed by Enrica Casucci and Levi Weintraub.
2755
2756         The bug was caused by positionOnlyToBeUpdated's offset not being shifted correctly in
2757         ReplaceSelectionCommand::mergeTextNodesAroundPosition. Suppose we have text nodes t1 and t2 and
2758         positionOnlyToBeUpdated had offset k in t2. When t2 is merged into t1, positionOnlyToBeUpdated should be
2759         moved to (t1, n + k) where n is the ORIGINAL length of t1 before t2 is merged. But we were using
2760         the length after t2 is merged.
2761
2762         Fixed the bug by saving the original length of t1 and using that in the offset adjustment.
2763         Also use the right offset.
2764
2765         Test: editing/pasteboard/copy-paste-first-line-in-textarea.html
2766
2767         * editing/ReplaceSelectionCommand.cpp:
2768         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
2769
2770 2012-10-18  Claudio Saavedra  <csaavedra@igalia.com>
2771
2772         [GTK] Invalid read from WebKit::DOMObjectCache::clearByFrame
2773         https://bugs.webkit.org/show_bug.cgi?id=82882
2774
2775         Reviewed by Xan Lopez.
2776
2777         Based on a patch by Milan Crha <mcrha@redhat.com>
2778
2779         Prevent an invalid access to a pointer while clearing the DOM
2780         object cache.
2781         * bindings/gobject/DOMObjectCache.cpp:
2782         (WebKit::DOMObjectCache::clearByFrame): Prevent an invalid access.
2783
2784 2012-10-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2785
2786         Unreviewed, rolling out r131810.
2787         http://trac.webkit.org/changeset/131810
2788         https://bugs.webkit.org/show_bug.cgi?id=99762
2789
2790         Broke linux debug webkit_unit_tests (Requested by
2791         danakj|gardening on #webkit).
2792
2793         * WebCore.gypi:
2794         * platform/graphics/ImageSource.cpp:
2795         (WebCore::ImageSource::setData):
2796         * platform/graphics/ImageSource.h:
2797         (WebCore):
2798         (ImageSource):
2799         * platform/graphics/chromium/DeferredImageDecoder.cpp: Removed.
2800         * platform/graphics/chromium/DeferredImageDecoder.h: Removed.
2801         * platform/graphics/chromium/ImageDecodingStore.cpp: Removed.
2802         * platform/graphics/chromium/ImageDecodingStore.h: Removed.
2803         * platform/graphics/chromium/ImageFrameGenerator.cpp: Removed.
2804         * platform/graphics/chromium/ImageFrameGenerator.h: Removed.
2805         * platform/graphics/chromium/LazyDecodingPixelRef.cpp: Removed.
2806         * platform/graphics/chromium/LazyDecodingPixelRef.h: Removed.
2807         * platform/graphics/chromium/ScaledImageFragment.cpp: Removed.
2808         * platform/graphics/chromium/ScaledImageFragment.h: Removed.
2809         * platform/graphics/skia/NativeImageSkia.cpp:
2810         (WebCore::NativeImageSkia::resizedBitmap):
2811         * platform/image-decoders/ImageDecoder.h:
2812         (ImageFrame):
2813
2814 2012-10-18  Tommy Widenflycht  <tommyw@google.com>
2815
2816         MediaStream API: Do some cleanup in the chromium WebKit API
2817         https://bugs.webkit.org/show_bug.cgi?id=99713
2818
2819         Reviewed by Adam Barth.
2820
2821         Removing the deprecated version of WebMediaStreamDescriptor::initialize.
2822
2823         No testing needed since only an unused function is removed.
2824
2825         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2826
2827 2012-10-18  Alpha Lam  <hclam@chromium.org>
2828
2829         [chromium] Implement deferred image decoding
2830         https://bugs.webkit.org/show_bug.cgi?id=94240
2831
2832         Reviewed by Stephen White.
2833
2834         Objectives:
2835
2836         To record image decoding operations during painting and to defer
2837         decoding operations until rasterization.
2838
2839         Rationale:
2840
2841         This is a key feature that enables impl-side painting which requires
2842         fast recording of drawing operations. The existing decode-on-draw
2843         restricts that recording has to block on expensive decoding operations.
2844         This change allows recording of image decoding operations during paint
2845         time.
2846
2847         Design:
2848
2849         Image decoding happens when a BitmapImage is drawn into a
2850         GraphicsContext. When per-tile painting is enabled GraphicsContext
2851         is backed by SkCanvas in recording mode. This SkCanvas records drawing
2852         and image decoding operations to minimize recording time.
2853
2854         An image decoding operation is recorded as a SkPixelRef object
2855         implemented by LazyDecodingPixelRef. This object references raw encoded
2856         data, regions to be decoded and scaling information.
2857
2858         When used in conjunction with per-tile painting this feature defers
2859         image decoding until the SkCanvas referencing the image is rasterized.
2860
2861         Both recording and rasterization happen on the main thread.
2862
2863         Performance Impact:
2864
2865         This feature is enabled by WebKit::setDeferredImageDecodingEnabled()
2866         and does not have an impact when disabled.
2867
2868         This feature is disabled by default.
2869
2870         Upcoming Changes:
2871
2872         1. Implement a full-featured image cache in ImageDecodingStore.
2873         2. Allow rasterization and decoding on impl thread.
2874
2875         Classes Involved:
2876
2877         BitmapImage
2878
2879         BitmapImage is the entry point for deferred image decoding. When
2880         drawing a BitmapImage into a GraphicsContext it makes a request to
2881         create a NativeImageSkia. We substitute the content in NativeImageSkia
2882         such that it is lazily decoded.
2883
2884         DeferredImageDecoder
2885
2886         This is the platform implementation of a image decoder for Chromium.
2887         This is a bridge layer that either delegates calls to the actual
2888         ImageDecoder or create a lazily-decoded SkBitmap and delegates calls
2889         to ImageDecodingStore.
2890
2891         ImageDecodingStore
2892
2893         This object manages all encoded images. It keeps track of encoded
2894         data and the corresponding ImageDecoder for doing actual decoding. It
2895         is also responsible for generating lazily decoded SkBitmaps. This
2896         SkBitmap contains a LazyDecodingPixelRef object which references to an
2897         image entry in ImageDecodingStore.
2898
2899         ScaledImageFragment
2900
2901         A container for a scaled image fragment. In addition to bitmap pixels
2902         it contains information about the ID of the image, scale and clipping.
2903
2904         ImageFrameGenerator
2905
2906         This object is responsible for generating decoded pixels. It is also
2907         a container for encoded image data and corresponding image decoder.
2908
2909         LazyDecodingPixelRef
2910
2911         This object is embedded in a SkBitmap to enable lazy decoding. When
2912         SkBitmap needs to access pixels LazyDecodingPixelRef is locked. It
2913         contains information to locate an image and scaling info, these
2914         information is submitted to ImageDecodingStore to access actual pixels.
2915
2916         Layout tests. There are about 80 tests in this virtual test suite
2917         running this feature in this directory:
2918
2919         platform/chromium/virtual/deferred/fast/images
2920
2921         Unit tests. Added DeferredImageDecoderTest to verify deferred
2922         image decoding behavior.
2923
2924         * WebCore.gypi:
2925         * platform/graphics/ImageSource.cpp:
2926         (WebCore::ImageSource::setData):
2927         * platform/graphics/ImageSource.h:
2928         (WebCore):
2929         (ImageSource):
2930         * platform/graphics/chromium/DeferredImageDecoder.cpp: Added.
2931         (WebCore):
2932         (WebCore::DeferredImageDecoder::DeferredImageDecoder):
2933         (WebCore::DeferredImageDecoder::~DeferredImageDecoder):
2934         (WebCore::DeferredImageDecoder::create):
2935         (WebCore::DeferredImageDecoder::createForTesting):
2936         (WebCore::DeferredImageDecoder::filenameExtension):
2937         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
2938         (WebCore::DeferredImageDecoder::setData):
2939         (WebCore::DeferredImageDecoder::isSizeAvailable):
2940         (WebCore::DeferredImageDecoder::size):
2941         (WebCore::DeferredImageDecoder::frameSizeAtIndex):
2942         (WebCore::DeferredImageDecoder::frameCount):
2943         (WebCore::DeferredImageDecoder::repetitionCount):
2944         (WebCore::DeferredImageDecoder::clearFrameBufferCache):
2945         (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex):
2946         (WebCore::DeferredImageDecoder::frameBytesAtIndex):
2947         * platform/graphics/chromium/DeferredImageDecoder.h: Added.
2948         (WebCore):
2949         (DeferredImageDecoder):
2950         * platform/graphics/chromium/ImageDecodingStore.cpp: Added.
2951         (WebCore::ImageDecodingStore::ImageDecodingStore):
2952         (WebCore):
2953         (WebCore::ImageDecodingStore::~ImageDecodingStore):
2954         (WebCore::ImageDecodingStore::instanceOnMainThread):
2955         (WebCore::ImageDecodingStore::initializeOnMainThread):
2956         (WebCore::ImageDecodingStore::shutdown):
2957         (WebCore::ImageDecodingStore::isLazyDecoded):
2958         (WebCore::ImageDecodingStore::createLazyDecodedSkBitmap):
2959         (WebCore::ImageDecodingStore::resizeLazyDecodedSkBitmap):
2960         (WebCore::ImageDecodingStore::setData):
2961         (WebCore::ImageDecodingStore::lockPixels):
2962         (WebCore::ImageDecodingStore::unlockPixels):
2963         (WebCore::ImageDecodingStore::frameGeneratorBeingDestroyed):
2964         (WebCore::ImageDecodingStore::calledOnValidThread):
2965         (WebCore::ImageDecodingStore::lookupFrameCache):
2966         (WebCore::ImageDecodingStore::deleteFrameCache):
2967         * platform/graphics/chromium/ImageDecodingStore.h: Added.
2968         (WebCore):
2969         (ImageDecodingStore):
2970         (WebCore::ImageDecodingStore::create):
2971         * platform/graphics/chromium/ScaledImageFragment.cpp: Added.
2972         (WebCore):
2973         (WebCore::ScaledImageFragment::~ScaledImageFragment):
2974         (WebCore::ScaledImageFragment::ScaledImageFragment):
2975         (WebCore::ScaledImageFragment::isEqual):
2976         * platform/graphics/chromium/ScaledImageFragment.h: Added.
2977         (WebCore):
2978         (ScaledImageFragment):
2979         (WebCore::ScaledImageFragment::create):
2980         (WebCore::ScaledImageFragment::bitmap):
2981         (WebCore::ScaledImageFragment::isComplete):
2982         * platform/graphics/chromium/ImageFrameGenerator.cpp: Added.
2983         (WebCore):
2984         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
2985         (WebCore::ImageFrameGenerator::~ImageFrameGenerator):
2986         (WebCore::ImageFrameGenerator::decoder):
2987         (WebCore::ImageFrameGenerator::setData):
2988         * platform/graphics/chromium/ImageFrameGenerator.h: Added.
2989         (WebCore):
2990         (ImageFrameGenerator):
2991         (WebCore::ImageFrameGenerator::create):
2992         (WebCore::ImageFrameGenerator::size):
2993         (WebCore::ImageFrameGenerator::imageId):
2994         * platform/graphics/chromium/LazyDecodingPixelRef.cpp: Added.
2995         (WebCore):
2996         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
2997         (WebCore::LazyDecodingPixelRef::~LazyDecodingPixelRef):
2998         (WebCore::LazyDecodingPixelRef::isScaled):
2999         (WebCore::LazyDecodingPixelRef::isClipped):
3000         (WebCore::LazyDecodingPixelRef::onLockPixels):
3001         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
3002         (WebCore::LazyDecodingPixelRef::onLockPixelsAreWritable):
3003         * platform/graphics/chromium/LazyDecodingPixelRef.h: Added.
3004         (WebCore):
3005         (LazyDecodingPixelRef):
3006         (WebCore::LazyDecodingPixelRef::frameGenerator):
3007         * platform/graphics/skia/NativeImageSkia.cpp:
3008         (WebCore::NativeImageSkia::resizedBitmap):
3009         * platform/image-decoders/ImageDecoder.h:
3010         (ImageFrame):
3011         (WebCore::ImageFrame::setSkBitmap):
3012         (WebCore::ImageFrame::getSkBitmap):
3013
3014 2012-10-18  Yael Aharon  <yael.aharon@intel.com>
3015
3016         [EFL] GraphicsContext3D::m_renderStyle is not initialized
3017         https://bugs.webkit.org/show_bug.cgi?id=99721
3018
3019         Reviewed by Antonio Gomes.
3020
3021         Initialize GraphicsContext3D::m_renderStyle.
3022
3023         No new tests, no new functionality.
3024
3025         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3026         (WebCore::GraphicsContext3D::GraphicsContext3D):
3027
3028 2012-10-18  Max Vujovic  <mvujovic@adobe.com>
3029
3030         [CSS Shaders] Validate types of built-in vertex attributes
3031         https://bugs.webkit.org/show_bug.cgi?id=98972
3032
3033         Reviewed by Dean Jackson.
3034
3035         Reject custom filters in which the author defined built-in attributes with the wrong type.
3036         For example, the GLSL declaration "attribute float a_position" is incorrect because
3037         a_position should be a vec4, not a float.
3038
3039         Test: css3/filters/custom/invalid-custom-filter-attribute-types.html
3040
3041         * platform/graphics/ANGLEWebKitBridge.h:
3042         (WebCore::ANGLEShaderSymbol::isSampler):
3043             Add const qualifier to isSampler method.
3044         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
3045         (WebCore):
3046         (WebCore::builtInAttributeNameToTypeMap):
3047             New file static function. Returns a map of the CSS Custom Filters built-in attribute
3048             names and their expected types.
3049         (WebCore::validateSymbols):
3050             New file static function. Loop through all of the symbols. Reject the shader if we find
3051             a built-in attribute defined with the wrong type.
3052         (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram):
3053             Call the new validateSymbols function. If it returns false, exit the constructor early,
3054             which rejects the program.
3055             Move the loop that checks if any uniform is a sampler into the the validateSymbols
3056             function.
3057
3058 2012-10-18  Mike Reed  <reed@google.com>
3059
3060         Handle if we fail to allocate nonPlatformCanvas in ImageBuffer constructor
3061         https://bugs.webkit.org/show_bug.cgi?id=99752
3062
3063         Reviewed by Stephen White.
3064
3065         Current code does not check if we were able to allocate the pixels, but still returns the canvas.
3066         However, the caller explicitly is checking for null on failure, so it will continue (and possibly
3067         crash later on).
3068         This change brings the nonPlatformCanvas behavior inline with createAcceleratedCanvas and
3069         TryCreateBitmapCanvas, both of which are also called by ImageBuffer's constructor.
3070
3071         No new tests. Existing tests exercise ImageBuffer constructor.
3072
3073         * platform/graphics/skia/ImageBufferSkia.cpp:
3074         (WebCore::createNonPlatformCanvas):
3075
3076 2012-10-18  Beth Dakin  <bdakin@apple.com>
3077
3078         https://bugs.webkit.org/show_bug.cgi?id=99668
3079         REGRESSION: Crash in 
3080         WebCore::ScrollingStateScrollingNode::setNonFastScrollableRegion
3081         -and corresponding-
3082         <rdar://problem/12491901>
3083
3084         Reviewed by Simon Fraser.
3085
3086         http://trac.webkit.org/changeset/130783 changed the lifetime of the 
3087         ScrollingStateTree's rootStateNode. Before that patch, the root state 
3088         node was never destroyed. It was just constantly re-used for 
3089         different RenderLayerBackings. This crash is just one of a few bugs 
3090         that has occurred because of that change. I have fixed the other bugs 
3091         individually, but I think that long-term, it is the safest solution 
3092         to go back to the original ownership model.
3093
3094         So this patch ensures that the state tree will always have a root 
3095         state node. Instead of destroying and re-creating the root node when 
3096         it's scroll ID changes, we just update the ID.
3097
3098         attachToStateTree() now takes an additional ID representing the ID of 
3099         the parent node.
3100         * page/scrolling/ScrollingCoordinator.h:
3101         (WebCore::ScrollingCoordinator::attachToStateTree):
3102
3103         Add a way to set the scrolling node ID.
3104         * page/scrolling/ScrollingStateNode.h:
3105         (WebCore::ScrollingStateNode::setScrollingNodeID):
3106
3107         This code that provided a way to mark all properties as having 
3108         changed was added in http://trac.webkit.org/changeset/130989 as a way 
3109         to ensure we would re-set ScrollingThread's nodes when we destroyed 
3110         and re-created the rootStateNode. Now that we are no longer 
3111         destroying and re-creating the rootStateNode, this code is no longer 
3112         necessary.
3113         * page/scrolling/ScrollingStateScrollingNode.cpp:
3114         * page/scrolling/ScrollingStateScrollingNode.h:
3115
3116         create m_rootStateNode right in the ScrollingStateTree's constructor.
3117         * page/scrolling/ScrollingStateTree.cpp:
3118         (WebCore::ScrollingStateTree::ScrollingStateTree):
3119
3120         Don't let removeNode() destroy m_rootStateNode.
3121         (WebCore::ScrollingStateTree::removeNode):
3122
3123         Also a part of r130989 that is no longer needed.
3124         (WebCore::ScrollingStateTree::rootLayerDidChange():
3125         * page/scrolling/ScrollingStateTree.h:
3126         (WebCore::ScrollingStateTree::rootStateNode):
3127         (ScrollingStateTree):
3128         (WebCore::ScrollingStateTree::setRootStateNode):
3129
3130         attachToStateTree() now takes an additional ID representing the ID of 
3131         the parent node.
3132         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3133         (ScrollingCoordinatorMac):
3134
3135         We no longer need ScrollingStateTree::rootLayerDidChange()
3136         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3137         (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
3138
3139         Do not destroy and re-create the state node. Just update its ID. When 
3140         we support child nodes soon, we will create them in this function.
3141         (WebCore::ScrollingCoordinatorMac::attachToStateTree):
3142
3143         No need to null-check the rootStateNode.
3144         (WebCore::ScrollingCoordinatorMac::clearStateTree):
3145
3146         Send 0 as the parent node ID to attachToStateTree() to represent the 
3147         root node.
3148         (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView):
3149         * rendering/RenderLayerBacking.cpp:
3150
3151         RenderLayerBacking::attachToScrollingCoordinator() now takes a parent 
3152         layer.
3153         (WebCore::RenderLayerBacking::attachToScrollingCoordinator):
3154         * rendering/RenderLayerBacking.h:
3155         (RenderLayerBacking):
3156
3157         Since this is the root, send 0 to represent the parent layer.
3158         * rendering/RenderLayerCompositor.cpp:
3159         (WebCore::RenderLayerCompositor::updateBacking):
3160
3161 2012-10-18  Yael Aharon  <yael.aharon@intel.com>
3162
3163         [EFL] GraphicsContext3D::m_renderStyle is not initialized
3164         https://bugs.webkit.org/show_bug.cgi?id=99721
3165
3166         Reviewed by Antonio Gomes.
3167
3168         Initialize GraphicsContext3D::m_renderStyle.
3169
3170         No new tests, no new functionality.
3171
3172         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3173         (WebCore::GraphicsContext3D::GraphicsContext3D):
3174
3175 2012-10-18  Brian White  <bcwhite@chromium.org>
3176
3177         WebKit Doesn't Recognize Content-Language HTTP Header
3178         https://bugs.webkit.org/show_bug.cgi?id=97929
3179
3180         Reviewed by Alexey Proskuryakov.
3181
3182         The HTTP "Content-Language" header may be present and include the
3183         language of the page contents (as opposed to an embedded meta tag).
3184
3185         * loader/FrameLoader.cpp:
3186         (WebCore::FrameLoader::didBeginDocument):
3187
3188 2012-10-18  Jer Noble  <jer.noble@apple.com>
3189
3190         Crash in WebCore::Document::webkitExitFullscreen + 618
3191         https://bugs.webkit.org/show_bug.cgi?id=99496
3192
3193         Reviewed by Eric Carlson.
3194
3195         Prospective fix for null-dereference crash in Document::webkitExitFullscreen().
3196
3197         * dom/Document.cpp:
3198         (WebCore::Document::webkitExitFullscreen): Null check page() before calling page()->chrome.
3199
3200 2012-10-18  Pablo Flouret  <pablof@motorola.com>
3201
3202         Implement css3-conditional's @supports rule
3203         https://bugs.webkit.org/show_bug.cgi?id=86146
3204
3205         Reviewed by Antti Koivisto.
3206
3207         The "@supports" rule is a conditional group rule whose condition tests
3208         whether the user agent supports CSS property:value pairs.
3209
3210         http://dev.w3.org/csswg/css3-conditional/#at-supports
3211
3212         Test: css3/supports.html
3213
3214         * Configurations/FeatureDefines.xcconfig:
3215         * GNUmakefile.am:
3216         * GNUmakefile.features.am:
3217             Add an ENABLE_CSS3_CONDITIONAL_RULES flag.
3218
3219         * css/CSSGrammar.y.in:
3220         * css/CSSParser.cpp:
3221         (WebCore):
3222         (WebCore::CSSParser::detectSupportsToken): Tries to find 'and', 'not' and 'or' tokens.
3223         (WebCore::CSSParser::detectAtToken): Enter SupportsMode if @supports is detected.
3224         (WebCore::CSSParser::realLex): Try to detect supports tokens when in SupportsMode.
3225         * css/CSSParser.h: Added new SupportsMode parsing mode.
3226         (CSSParser):
3227
3228 2012-10-18  Marja Hölttä  <marja@chromium.org>
3229
3230         Fix: CachedResourceLoader::requestSVGDocument was passing an URL as charset
3231         https://bugs.webkit.org/show_bug.cgi?id=99730
3232
3233         Reviewed by Jochen Eisinger.
3234
3235         * loader/cache/CachedResourceLoader.cpp:
3236         (WebCore::CachedResourceLoader::requestSVGDocument):
3237
3238 2012-10-18  Jer Noble  <jer.noble@apple.com>
3239
3240         Fullscreen movie controls behave incorrectly when clicked (and dragged)
3241         https://bugs.webkit.org/show_bug.cgi?id=99610
3242
3243         Reviewed by Eric Carlson.
3244
3245         Do not reset the relative drag position to 0,0 at the beginning of every drag.  Instead,
3246         store the cumulative drag offset and accumulate during each additional drag.
3247
3248         No new tests; modified the fullscreen/video-controls-drag.html test.
3249
3250         * html/shadow/MediaControlElements.cpp:
3251         (WebCore::MediaControlPanelElement::startDrag): Reset m_lastDragEventLocation.
3252         (WebCore::MediaControlPanelElement::continueDrag): Accumulate drag distance in m_cumulativeDragOffset.
3253         (WebCore::MediaControlPanelElement::resetPosition): Reset m_cumulativeDragOffset.
3254         * html/shadow/MediaControlElements.h:
3255
3256 2012-10-18  Brandon Jones  <bajones@google.com>
3257
3258         Implement OES_element_index_uint / WEBKIT_OES_element_index_uint
3259         https://bugs.webkit.org/show_bug.cgi?id=97400
3260
3261         Reviewed by Kenneth Russell.
3262
3263         Implemented OES_element_index_uint WebGL extension
3264
3265         Test: fast/canvas/webgl/oes-element-index-uint.html
3266
3267         * CMakeLists.txt:
3268         * DerivedSources.make:
3269         * DerivedSources.pri:
3270         * GNUmakefile.list.am:
3271         * Target.pri:
3272         * WebCore.gypi:
3273         * WebCore.xcodeproj/project.pbxproj:
3274         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3275         (WebCore::toJS):
3276         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3277         (WebCore::toV8Object):
3278         * html/canvas/OESElementIndexUint.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
3279         (WebCore):
3280         (WebCore::OESElementIndexUint::OESElementIndexUint):
3281         (WebCore::OESElementIndexUint::~OESElementIndexUint):
3282         (WebCore::OESElementIndexUint::getName):
3283         (WebCore::OESElementIndexUint::create):
3284         * html/canvas/OESElementIndexUint.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
3285         (WebCore):
3286         (OESElementIndexUint):
3287         * html/canvas/OESElementIndexUint.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
3288         * html/canvas/WebGLExtension.h:
3289         * html/canvas/WebGLRenderingContext.cpp:
3290         (WebCore):
3291         (WebCore::WebGLRenderingContext::validateElementArraySize):
3292         (WebCore::WebGLRenderingContext::validateIndexArrayConservative):
3293         (WebCore::WebGLRenderingContext::validateIndexArrayPrecise):
3294         (WebCore::WebGLRenderingContext::validateRenderingState):
3295         (WebCore::WebGLRenderingContext::drawElements):
3296         (WebCore::WebGLRenderingContext::getExtension):
3297         (WebCore::WebGLRenderingContext::getSupportedExtensions):
3298         * html/canvas/WebGLRenderingContext.h:
3299         (WebCore):
3300         (WebGLRenderingContext):
3301         * platform/graphics/Extensions3D.h:
3302         (Extensions3D):
3303         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3304         (WebCore::Extensions3DOpenGL::supportsExtension):
3305
3306 2012-10-18  Jer Noble  <jer.noble@apple.com>
3307
3308         Add diagnostic logging to track per-page media engine usage.
3309         https://bugs.webkit.org/show_bug.cgi?id=99615
3310         <rdar://problem/12476473>
3311
3312         Reviewed by Eric Carlson.
3313
3314         Add diagnostic logging triggered only once-per-page and once-per-page-per-engine.
3315
3316         * html/HTMLMediaElement.cpp:
3317         (WebCore::logMediaLoadRequest): Encapsulate diagnostic logging into single static method.
3318         (WebCore::HTMLMediaElement::mediaLoadingFailed): Call logMediaLoadRequest.
3319         (WebCore::HTMLMediaElement::setReadyState): Ditto.
3320         * loader/FrameLoader.cpp:
3321         (WebCore::FrameLoader::dispatchDidCommitLoad): Reset the set of seen media engines.
3322
3323         Add new methods to Page to track per-page media engine diagnostic info, similar to plugin diagnostic info.
3324         * page/Page.cpp:
3325         (WebCore::Page::hasSeenAnyMediaEngine):
3326         (WebCore::Page::hasSeenMediaEngine):
3327         (WebCore::Page::sawMediaEngine):
3328         (WebCore::Page::resetSeenMediaEngines):
3329         * page/Page.h:
3330
3331         Add new static logging key definitions:
3332         * page/DiagnosticLoggingKeys.cpp:
3333         (WebCore::DiagnosticLoggingKeys::pageContainsMediaEngineKey):
3334         (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey):
3335         * page/DiagnosticLoggingKeys.h:
3336
3337 2012-10-18  Michael Saboff  <msaboff@apple.com>
3338
3339         Add 8-bit path to RenderBlock::handleTrailingSpaces()
3340         https://bugs.webkit.org/show_bug.cgi?id=99731
3341
3342         Reviewed by Dan Bernstein.
3343
3344         Factored out and added findFirstTrailingSpace() templated helper function that is called with the 
3345         approriate character pointer type.
3346
3347         No tests needed, change covered by existing tests.
3348
3349         * rendering/RenderBlockLineLayout.cpp:
3350         (WebCore::findFirstTrailingSpace):
3351         (WebCore::RenderBlock::handleTrailingSpaces):
3352
3353 2012-10-18  Hans Muller  <hmuller@adobe.com>
3354
3355         [CSS Exclusions] Add ExclusionShape::shapeBoundingBox() method
3356         https://bugs.webkit.org/show_bug.cgi?id=99216
3357
3358         Reviewed by Dirk Schulze.
3359
3360         Added a FloatRect::extend() method which simplifies writing loops that
3361         accumulate the bounding box for a sequence of FloatPoints. The new method
3362         is used by ExclusionPolygon to initialize the shape's logical and physical
3363         bounding boxes. This a clean-up, not a change in functionality. It's already
3364         covered by the existing fast/exclusions LayoutTests.
3365
3366         * platform/graphics/FloatRect.cpp:
3367         (WebCore::FloatRect::extend): Extend the FloatRect's bounds to include a FloatPoint.
3368         (WebCore):
3369         * platform/graphics/FloatRect.h:
3370         (FloatRect): Added extend() method.
3371         * rendering/ExclusionPolygon.cpp:
3372         (WebCore::ExclusionPolygon::ExclusionPolygon): Use FloatRect::extend() to compute the polygon's internal bounding box.
3373         * rendering/ExclusionShape.cpp:
3374         (WebCore::ExclusionShape::createExclusionShape): Use FloatRect::extend() to compute the polygon's physical bounding box.
3375         * rendering/ExclusionShape.h:
3376         (WebCore::ExclusionShape::shapeBoundingBox): Return the shape's bounding box in physical coordinates.
3377         (ExclusionShape):
3378
3379 2012-10-18  Hans Muller  <hmuller@adobe.com>
3380
3381         [CSS Exclusions] Handle special case "empty" shapes
3382         https://bugs.webkit.org/show_bug.cgi?id=99342
3383
3384         Reviewed by Dirk Schulze.
3385
3386         Provide expclit coverage of the simple "empty" shape-inside shapes.
3387         Shapes will be considered "empty" in the sense that ExclusionShape::getIncludedIntervals()
3388         and ExclusionShape::getExcludedIntervals() will always return empty lists of intervals.
3389         This patch covers rectangles of zero width or height, circles with 0 radius, ellipses
3390         with 0 radiusX or radiusY, polygons with less than 3 vertices.
3391
3392         Test: fast/exclusions/shape-inside/shape-inside-empty.html
3393
3394         * rendering/ExclusionPolygon.cpp:
3395         (WebCore::ExclusionPolygon::ExclusionPolygon): Initialize the m_empty flag.
3396         (WebCore::ExclusionPolygon::getExcludedIntervals): Added short-circuit return when the polygon is empty.
3397         (WebCore::ExclusionPolygon::getIncludedIntervals): Added short-circuit return when the polygon is empty.
3398         * rendering/ExclusionPolygon.h: Added the isEmpty() method.
3399         * rendering/ExclusionRectangle.cpp:
3400         (WebCore::ExclusionRectangle::getExcludedIntervals): Added short-circuit return when the rectangle is empty.
3401         (WebCore::ExclusionRectangle::getIncludedIntervals): Added short-circuit return when the rectangle is empty.
3402         * rendering/ExclusionRectangle.h: Added the isEmpty() method.
3403         * rendering/ExclusionShape.h: Added a virtual isEmpty() ExclusionShape method.
3404         (ExclusionShape):
3405
3406 2012-10-18  Takashi Sakamoto  <tasak@google.com>
3407
3408         REGRESSION(r131464): Null-pointer crash in StyleResolver::styleForElement
3409         https://bugs.webkit.org/show_bug.cgi?id=99587
3410
3411         Reviewed by Dimitri Glazkov.
3412
3413         Since contents in datalist are not shown, summary in datalist is not
3414         shown either. So the summary has no render style. On the other hand,
3415         the summary is implemented by shadow DOM and it has some insertion
3416         point. Its child, e.g. title in the below test, is distributed.
3417         To solve the child's user-modify, looking at shadow host(=summary)'s
3418         style causes null-pointer crash.
3419
3420         Test: fast/dom/shadow/user-modify-in-datalist-crash.html
3421
3422         * css/StyleResolver.cpp:
3423         (WebCore::StyleResolver::styleForElement):
3424         Added a code to check whether the shadow host has any style or not.
3425
3426 2012-10-17  Philippe Normand  <pnormand@igalia.com>
3427
3428         [GTK] AudioBusGtk sometimes fails to load the HRTF database
3429         https://bugs.webkit.org/show_bug.cgi?id=99601
3430
3431         Reviewed by Martin Robinson.
3432
3433         AudioBusGtk now first lookup for the uninstalled resource files,
3434         if the AUDIO_RESOURCES_PATH environment variable is
3435         set. Additionally the audio file reader is now better dealing with
3436         errors, returning an empty AudioBus in such cases and issuing
3437         warnings on the console output. The cleanup of some member
3438         variables was also moved to the destructor.
3439
3440         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3441         (AudioFileReader):
3442         (WebCore::AudioFileReader::AudioFileReader):
3443         (WebCore::AudioFileReader::~AudioFileReader): Clear and free
3444         member variables. This was done in createBus before.
3445         (WebCore::AudioFileReader::handleMessage): Issue warnings in case
3446         of error and exit from the main loop so the pipeline is not
3447         forever stuck.
3448         (WebCore::AudioFileReader::createBus): Return an empty bus in case
3449         of error.
3450         * platform/audio/gtk/AudioBusGtk.cpp:
3451         (WebCore::AudioBus::loadPlatformResource): Load uninstalled
3452         resources first if AUDIO_RESOURCES_PATH is set.
3453
3454 2012-10-18  Pavel Feldman  <pfeldman@chromium.org>
3455
3456         Web Inspector: provisional change for merging "doced" state into the "dock side" enum.
3457         https://bugs.webkit.org/show_bug.cgi?id=99718
3458
3459         Reviewed by Vsevolod Vlasov.
3460
3461         Adds stub method that could be executed from the embedder.
3462
3463         * inspector/front-end/InspectorFrontendAPI.js:
3464         (InspectorFrontendAPI.setDockSide):
3465
3466 2012-10-18  Kent Tamura  <tkent@chromium.org>
3467
3468         Add Localizer::monthFormat and implementations
3469         https://bugs.webkit.org/show_bug.cgi?id=99704
3470
3471         Reviewed by Kentaro Hara.