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