Implement HTMLTemplateElement
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-03  Rafael Weinstein  <rafaelw@chromium.org>
2
3         Implement HTMLTemplateElement
4         https://bugs.webkit.org/show_bug.cgi?id=86031
5
6         Reviewed by Adam Barth.
7
8         Initial implementation. This patch includes the parser changes, new IDL and element implementation for <template>.
9
10         Spec: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
11
12         Tests: fast/dom/HTMLTemplateElement/cloneNode.html
13                fast/dom/HTMLTemplateElement/inertContents.html
14                fast/dom/HTMLTemplateElement/innerHTML.html
15                fast/dom/HTMLTemplateElement/ownerDocument.html
16                html5lib/run-template.html
17
18         * WebCore.gypi:
19         * css/html.css:
20         (template):
21         * dom/Document.cpp:
22         (WebCore):
23         (WebCore::Document::templateContentsOwnerDocument):
24         * dom/Document.h:
25         (Document):
26         * editing/MarkupAccumulator.cpp:
27         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
28         * html/HTMLElement.h:
29         (HTMLElement):
30         * html/HTMLElementsAllInOne.cpp:
31         * html/HTMLTagNames.in:
32         * html/HTMLTemplateElement.cpp: Added.
33         (WebCore):
34         (WebCore::HTMLTemplateElement::HTMLTemplateElement):
35         (WebCore::HTMLTemplateElement::setInnerHTML):
36         (WebCore::HTMLTemplateElement::~HTMLTemplateElement):
37         (WebCore::HTMLTemplateElement::create):
38         (WebCore::HTMLTemplateElement::content):
39         (WebCore::HTMLTemplateElement::setContent):
40         (WebCore::toHTMLTemplateElement):
41         * html/HTMLTemplateElement.h: Added.
42         (WebCore):
43         (HTMLTemplateElement):
44         (WebCore::toHTMLTemplateElement):
45         * html/HTMLTemplateElement.idl: Added.
46         * html/parser/HTMLConstructionSite.cpp:
47         (WebCore::executeTask):
48         (WebCore::HTMLConstructionSite::insertComment):
49         (WebCore::HTMLConstructionSite::insertTextNode):
50         (WebCore::HTMLConstructionSite::createElement):
51         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
52         (WebCore):
53         (WebCore::HTMLConstructionSite::createHTMLElement):
54         (WebCore::HTMLConstructionSite::findFosterSite):
55         * html/parser/HTMLConstructionSite.h:
56         (HTMLConstructionSite):
57         * html/parser/HTMLElementStack.cpp:
58         (WebCore):
59         (WebCore::HTMLElementStack::hasTemplateInHTMLScope):
60         * html/parser/HTMLElementStack.h:
61         (HTMLElementStack):
62         * html/parser/HTMLTreeBuilder.cpp:
63         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
64         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
65         (WebCore):
66         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
67         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
68         (WebCore::HTMLTreeBuilder::processStartTag):
69         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
70         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
71         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
72         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
73         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
74         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
75         (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
76         (WebCore::HTMLTreeBuilder::processTableEndTagForInTable):
77         (WebCore::HTMLTreeBuilder::processEndTag):
78         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
79         (WebCore::HTMLTreeBuilder::processEndOfFile):
80         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
81         * html/parser/HTMLTreeBuilder.h:
82         (HTMLTreeBuilder):
83         (WebCore::HTMLTreeBuilder::isParsingTemplateContents):
84         (WebCore::HTMLTreeBuilder::isParsingFragmentOrTemplateContents):
85         * page/DOMWindow.idl:
86
87 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
88
89         Unreviewed, rolling out r136460.
90         http://trac.webkit.org/changeset/136460
91         https://bugs.webkit.org/show_bug.cgi?id=103958
92
93         This patch caused compile error when building DumpRenderTree
94         (Requested by tasak on #webkit).
95
96         * WebCore.gyp/WebCore.gyp:
97         * WebCore.gypi:
98         * platform/chromium/PlatformThemeChromiumLinux.cpp: Added.
99         (WebCore):
100         (WebCore::PlatformThemeChromiumLinux::setScrollbarColors):
101         (WebCore::clamp):
102         (WebCore::PlatformThemeChromiumLinux::saturateAndBrighten):
103         (WebCore::PlatformThemeChromiumLinux::outlineColor):
104         (WebCore::PlatformThemeChromiumLinux::paintArrowButton):
105         * platform/chromium/PlatformThemeChromiumLinux.h: Added.
106         (WebCore):
107         (PlatformThemeChromiumLinux):
108         (WebCore::PlatformThemeChromiumLinux::thumbInactiveColor):
109         (WebCore::PlatformThemeChromiumLinux::thumbActiveColor):
110         (WebCore::PlatformThemeChromiumLinux::trackColor):
111         (WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux):
112         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Added.
113         (WebCore):
114         (WebCore::ScrollbarTheme::nativeTheme):
115         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
116         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
117         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
118         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
119         (WebCore::ScrollbarThemeChromiumLinux::shouldCenterOnThumb):
120         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
121         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
122         * platform/chromium/ScrollbarThemeChromiumLinux.h: Added.
123         (ScrollbarThemeChromiumLinux):
124         * rendering/RenderThemeChromiumAndroid.cpp:
125         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet):
126         * rendering/RenderThemeChromiumAndroid.h:
127         * rendering/RenderThemeChromiumLinux.cpp: Added.
128         (WebCore):
129         (WebCore::getWebThemeState):
130         (WebCore::RenderThemeChromiumLinux::create):
131         (WebCore::RenderTheme::themeForPage):
132         (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
133         (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
134         (WebCore::RenderThemeChromiumLinux::systemColor):
135         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
136         (WebCore::RenderThemeChromiumLinux::controlSupportsTints):
137         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionBackgroundColor):
138         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionForegroundColor):
139         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionBackgroundColor):
140         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionForegroundColor):
141         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionBackgroundColor):
142         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionBackgroundColor):
143         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionForegroundColor):
144         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionForegroundColor):
145         (WebCore::RenderThemeChromiumLinux::sliderTickSize):
146         (WebCore::RenderThemeChromiumLinux::sliderTickOffsetFromTrackCenter):
147         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
148         (WebCore::RenderThemeChromiumLinux::supportsControlTints):
149         (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
150         (WebCore::RenderThemeChromiumLinux::caretBlinkIntervalInternal):
151         (WebCore::RenderThemeChromiumLinux::setSelectionColors):
152         (WebCore::RenderThemeChromiumLinux::paintCheckbox):
153         (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
154         (WebCore::RenderThemeChromiumLinux::paintRadio):
155         (WebCore::RenderThemeChromiumLinux::setRadioSize):
156         (WebCore::RenderThemeChromiumLinux::paintButton):
157         (WebCore::RenderThemeChromiumLinux::paintTextField):
158         (WebCore::RenderThemeChromiumLinux::paintMenuList):
159         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
160         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
161         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
162         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
163         (WebCore::RenderThemeChromiumLinux::paintProgressBar):
164         (WebCore::RenderThemeChromiumLinux::shouldOpenPickerWithF4Key):
165         * rendering/RenderThemeChromiumLinux.h: Added.
166         (WebCore):
167         (RenderThemeChromiumLinux):
168
169 2012-12-03  Julien Chaffraix  <jchaffraix@webkit.org>
170
171         [CSS Grid Layout] Support paddings and margins on grid items
172         https://bugs.webkit.org/show_bug.cgi?id=103677
173
174         Reviewed by Tony Chang.
175
176         After bug 102968, we properly resolve grid items' width and height against the
177         grid areas' sizes. However we didn't check for paddings and margins, which is
178         what this change fixes..
179
180         Test: fast/css-grid-layout/percent-padding-margin-resolution-grid-item.html
181
182         * rendering/RenderBox.cpp:
183         (WebCore::RenderBox::computeLogicalWidthInRegion):
184         Don't stretch the end margin to match the containing block's extent.
185         The fix is similar to what was done for flex-box in bug 65887.
186
187         * rendering/RenderBoxModelObject.cpp:
188         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
189         Added a comment about not using containingBlockLogicalWidthForContent.
190
191         (WebCore::RenderBoxModelObject::computedCSSPaddingTop):
192         (WebCore::RenderBoxModelObject::computedCSSPaddingBottom):
193         (WebCore::RenderBoxModelObject::computedCSSPaddingLeft):
194         (WebCore::RenderBoxModelObject::computedCSSPaddingRight):
195         (WebCore::RenderBoxModelObject::computedCSSPaddingBefore):
196         (WebCore::RenderBoxModelObject::computedCSSPaddingAfter):
197         (WebCore::RenderBoxModelObject::computedCSSPaddingStart):
198         (WebCore::RenderBoxModelObject::computedCSSPaddingEnd):
199         Updated these functions to use containingBlockLogicalWidthForContent.
200
201         * rendering/RenderGrid.h:
202         * rendering/RenderObject.h:
203         (WebCore::RenderObject::isRenderGrid):
204         Added isRenderGrid.
205
206 2012-12-03  Scott Violet  <sky@chromium.org>
207
208         [chromium] Remove linux theme related files and switch to default
209         https://bugs.webkit.org/show_bug.cgi?id=103897
210
211         Reviewed by Darin Fisher.
212
213         linux theme related files are now named default. This removes
214         linux theme files, updates build files and removes ifdefs.
215
216         Code cleanup, no new tests.
217
218         * WebCore.gyp/WebCore.gyp: Update build rules
219         * WebCore.gypi: Update build rules
220         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
221         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
222         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
223         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
224         * rendering/RenderThemeChromiumAndroid.h: Change superclass
225         * rendering/RenderThemeChromiumAndroid.cpp: Change call to superclass
226         * rendering/RenderThemeChromiumLinux.cpp: Removed.
227         * rendering/RenderThemeChromiumLinux.h: Removed.
228
229 2012-12-03  Pierre Rossi  <pierre.rossi@digia.com>
230
231         [Qt] Unreviewed build fix after r136410
232
233         When building without libjpeg, take JPEGImageDecoder's header out, since it now includes libjpeg.h.
234
235         * Target.pri: conditionally add JPEGImageDecoder.h to HEADERS
236         * platform/image-decoders/ImageDecoder.cpp: guard JPEGImageDecoder.h's include
237
238 2012-12-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
239
240         [EFL][Qt][WK2] Fixed position elements are not always fixed
241         https://bugs.webkit.org/show_bug.cgi?id=103452
242
243         Reviewed by Simon Fraser.
244
245         The code figuring out whether fixed position layers are inside
246         the visible viewport, assumes that the visible viewport is always
247         the size of the layout viewport. This assumption doesn't hold with
248         how the Qt and EFL tiled backing store and coordinated graphics
249         works, so instead using the visibleContentsRect(), which provides
250         the right values in all cases.
251
252         * rendering/RenderLayerCompositor.cpp:
253         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
254
255             Use visibleContentsRect instead of scrollOffsetForFixedPosition().
256
257             scrollOffsetForFixedPosition() is needed sometimes in the Mac code
258             because visibleContentRect() will return negative offsets when you
259             are in the rubber-band phase of a scroll on the Mac.
260
261             However that is not an issue here.
262
263 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
264
265         Unreviewed, rolling out r135271.
266         http://trac.webkit.org/changeset/135271
267         https://bugs.webkit.org/show_bug.cgi?id=103940
268
269         Some user stylesheet API clients broken (Requested by anttik
270         on #webkit).
271
272         * css/StyleResolver.cpp:
273         (WebCore::StyleResolver::StyleResolver):
274         (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
275         (WebCore::collectCSSOMWrappers):
276         * css/StyleResolver.h:
277         (StyleResolver):
278         * dom/Document.cpp:
279         (WebCore::Document::setCompatibilityMode):
280         * dom/DocumentStyleSheetCollection.cpp:
281         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
282         (WebCore::DocumentStyleSheetCollection::pageUserSheet):
283         (WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
284         (WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
285         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
286         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
287         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
288         * dom/DocumentStyleSheetCollection.h:
289         (DocumentStyleSheetCollection):
290         (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
291         * page/Page.cpp:
292         (WebCore::Page::userStyleSheetLocationChanged):
293
294 2012-11-30  Andrey Kosyakov  <caseq@chromium.org>
295
296         Web Inspector: make it possible to fliter out messages from console.{time,timeEnd}()
297         https://bugs.webkit.org/show_bug.cgi?id=103781
298
299         Reviewed by Yury Semikhatsky.
300
301         - make console messages produced by console.timeEnd() TimingMessageType & DebugMessageLevel;
302         - add console filter for Debug messages;
303
304         * inspector/ConsoleMessage.cpp:
305         (WebCore::messageTypeValue):
306         * inspector/Inspector.json:
307         * inspector/InspectorConsoleAgent.cpp:
308         (WebCore::InspectorConsoleAgent::stopTiming):
309         * inspector/front-end/ConsoleMessage.js:
310         (WebInspector.ConsoleMessageImpl.prototype.toMessageElement):
311         * inspector/front-end/ConsoleView.js:
312         (WebInspector.ConsoleView.prototype.):
313         (WebInspector.ConsoleView.prototype.filter):
314         * inspector/front-end/inspector.css:
315         (.console-warning-level, .console-error-level, .console-log-level, .console-debug-level):
316         (.filter-all .console-debug-level, .filter-debug .console-debug-level):
317         (.filter-all .console-debug-level.repeated-message, .filter-debug .console-debug-level.repeated-message):
318         * page/ConsoleTypes.h:
319
320 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
321
322         Unreviewed, rolling out r136444.
323         http://trac.webkit.org/changeset/136444
324         https://bugs.webkit.org/show_bug.cgi?id=103938
325
326         broke chromium build (Requested by zhenyao_wfh on #webkit).
327
328         * Target.pri:
329         * platform/image-decoders/ImageDecoder.cpp:
330
331 2012-12-03  Pierre Rossi  <pierre.rossi@digia.com>
332
333         [Qt] Unreviewed build fix after r136410
334
335         When building without libjpeg, take JPEGImageDecoder's header out, since it now includes libjpeg.h.
336
337         * Target.pri: conditionally add JPEGImageDecoder.h to HEADERS
338         * platform/image-decoders/ImageDecoder.cpp: guard JPEGImageDecoder.h's include
339
340 2012-11-30  James Simonsen  <simonjam@chromium.org>
341
342         [Resource Timing] Record and report initiator
343         https://bugs.webkit.org/show_bug.cgi?id=103777
344
345         Reviewed by Nate Chapin.
346
347         This will start populating the Resource Timing buffer with entries. The initiator will be
348         recorded for each CachedResourceLoader. This should match the next update of the spec.
349
350         Tests: http/tests/w3c/webperf/submission/resource-timing
351
352         * css/CSSFontSelector.cpp:
353         (WebCore::CSSFontSelector::beginLoadTimerFired):
354         * loader/ResourceLoadNotifier.cpp: Always record timing information if ENABLE(RESOURCE_TIMING).
355         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
356         * loader/SubresourceLoader.cpp:
357         (WebCore::SubresourceLoader::releaseResources): Report the actual resource that called loadDone().
358         * loader/cache/CachedResourceLoader.cpp:
359         (WebCore::CachedResourceLoader::loadResource): Record the initiator.
360         (WebCore::CachedResourceLoader::loadDone): Record the entry in Resource Timing.
361         * loader/cache/CachedResourceLoader.h:
362         (CachedResourceLoader):
363         (InitiatorInfo):
364
365 2012-12-03  Florin Malita  <fmalita@chromium.org>
366
367         [Skia] Deferred SkCanvas save()
368         https://bugs.webkit.org/show_bug.cgi?id=102272
369
370         Reviewed by Stephen White.
371
372         Implement a lazy save() strategy: instead of delegating to the canvas upfront, defer and
373         only commit when a clip/matrix mutation is observed.
374
375         The patch yields a 1-20% SkCanvas save/restore reduction for heavy pages, with much larger
376         gains observed for deeply nested SVG content.
377
378         No new tests: no behaviour changes, coverage provided by existing tests.
379
380         * platform/graphics/skia/GraphicsContextSkia.cpp:
381         (WebCore::GraphicsContext::canvasClip):
382         * platform/graphics/skia/PlatformContextSkia.cpp:
383         (WebCore):
384         (WebCore::PlatformContextSkia::DeferredSaveState::DeferredSaveState):
385         (PlatformContextSkia::DeferredSaveState):
386         (WebCore::PlatformContextSkia::PlatformContextSkia):
387         (WebCore::PlatformContextSkia::save):
388         (WebCore::PlatformContextSkia::saveLayer):
389         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
390         (WebCore::PlatformContextSkia::restore):
391         (WebCore::PlatformContextSkia::applyClipFromImage):
392         * platform/graphics/skia/PlatformContextSkia.h:
393         (PlatformContextSkia):
394         (WebCore::PlatformContextSkia::realizeSave):
395         (WebCore):
396         (WebCore::PlatformContextSkia::canvas):
397         (WebCore::PlatformContextSkia::clipPath):
398         (WebCore::PlatformContextSkia::clipRect):
399         (WebCore::PlatformContextSkia::setMatrix):
400         (WebCore::PlatformContextSkia::concat):
401         (WebCore::PlatformContextSkia::rotate):
402         (WebCore::PlatformContextSkia::scale):
403         (WebCore::PlatformContextSkia::translate):
404
405 2012-12-03  Simon Fraser  <simon.fraser@apple.com>
406
407         When animating mask-postion on a composited layer, element renders incorrectly
408         https://bugs.webkit.org/show_bug.cgi?id=103700
409
410         Reviewed by Tim Horton.
411
412         When a composited layer has a mask, we clipped the layer bounds to the
413         size of the mask. This caused problems when animating the mask origin,
414         which is considered a 'repaint' style change and so should not require
415         layout or compositing geometry changes.
416         
417         Fix by ignoring the mask when computing the bounds of the compositing
418         layer.
419
420         Test: compositing/masks/mask-layer-size.html
421
422         * rendering/RenderLayer.cpp:
423         (WebCore::RenderLayer::localBoundingBox):
424         (WebCore::RenderLayer::calculateLayerBounds):
425         * rendering/RenderLayer.h:
426         (RenderLayer):
427         * rendering/RenderLayerCompositor.cpp:
428         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
429
430 2012-12-03  Xan Lopez  <xan@igalia.com>
431
432         [CSS Grid Layout] Support <percentage> and viewport-relative breadth sizes
433         https://bugs.webkit.org/show_bug.cgi?id=103335
434
435         Reviewed by Julien Chaffraix.
436
437         Test: fast/css-grid-layout/breadth-size-resolution-grid.html
438
439         * css/CSSComputedStyleDeclaration.cpp:
440         (WebCore::valueForGridTrackBreadth): Support the new types.
441         (WebCore::valueForGridTrackMinMax): Modify the call to previous
442         method, since the signature has changed.
443         (WebCore::valueForGridTrackGroup): Ditto.
444         (WebCore::valueForGridTrackList): Ditto.
445         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Ditto.
446         * rendering/RenderGrid.cpp:
447         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Suport
448         percent and viewport relative types, calc() will be supported in a
449         follow up (see bug #103761)
450
451 2012-12-03  Peter Rybin  <prybin@chromium.org>
452
453         Web Inspector: make ASSERTION FAILED: foundPropertiesCount == object->size() more useful
454         https://bugs.webkit.org/show_bug.cgi?id=103254
455
456         Reviewed by Pavel Feldman.
457
458         Assert code generation is slightly changed so that it dumped JSON object text before crashing.
459
460         * inspector/CodeGeneratorInspector.py:
461
462 2012-12-03  Max Vujovic  <mvujovic@adobe.com>
463
464         [CSS Shaders] Do not clamp indirect array indices during CSS Shaders ANGLE validation pass
465         https://bugs.webkit.org/show_bug.cgi?id=102731
466
467         Reviewed by Dean Jackson.
468
469         Before this patch, we validated all shaders with the compile flag
470         SH_CLAMP_INDIRECT_ARRAY_BOUNDS in ANGLEWebKitBridge. This would insert a GLSL function
471         "webgl_int_clamp" in validated CSS shaders. However, when validated CSS shaders would pass
472         through ANGLE again at the GC3D level, ANGLE would reject them because they would contain
473         the "webgl_" restricted prefix.
474
475         Now, we only pass the compile flag SH_CLAMP_INDIRECT_ARRAY_BOUNDS at the GC3D level.
476
477         Test: css3/filters/custom/custom-filter-array-uniform-indirect-index.html
478
479         * platform/graphics/ANGLEWebKitBridge.cpp:
480         (WebCore::ANGLEWebKitBridge::compileShaderSource):
481             Remove the SH_CLAMP_INDIRECT_ARRAY_BOUNDS compile flag.
482         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
483         (WebCore::CustomFilterValidatedProgram::compiledProgram):
484             Add an assert that validated programs compile at the GC3D or platform level to help us
485             catch validation and rewriting issues.
486         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
487         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
488             Pass the SH_CLAMP_INDIRECT_ARRAY_BOUNDS to compileShaderSource.
489
490 2012-12-03  Eugene Klyuchnikov  <eustas@chromium.org>
491
492         Web Inspector: Make main-thread monitoring go through InspectorController
493         https://bugs.webkit.org/show_bug.cgi?id=103550
494
495         Reviewed by Pavel Feldman.
496
497         InspectorInstrumentation was a wrong path.
498
499         * inspector/InspectorClient.h: Remove start/stop methods.
500         * inspector/InspectorController.cpp:
501         Dispatch main thread activity notifications.
502         * inspector/InspectorController.h: Ditto.
503         * inspector/InspectorInstrumentation.cpp: Remove dispatchng.
504         * inspector/InspectorInstrumentation.h: Ditto.
505         * inspector/InspectorTimelineAgent.cpp:
506         Do not subscribe for notifications explicitly.
507
508 2012-12-03  Philip Rogers  <pdr@google.com>
509
510         Invalidate SVG width on width attribute changes.
511         https://bugs.webkit.org/show_bug.cgi?id=103304
512
513         Reviewed by Dirk Schulze.
514
515         An inline SVG element's replaced width can depend on both attributes and style properties.
516         After r105513, we invalidated this width on style changes but not attribute changes. With
517         this patch we invalidate the replaced width on width attribute changes too. Note that height
518         is handled differently for replaced elements so only the width attribute needs this handling
519         (the added test covers this too).
520
521         Test: svg/custom/root-size-attribute-changes.html
522
523         * svg/SVGSVGElement.cpp:
524         (WebCore::SVGSVGElement::svgAttributeChanged):
525
526 2012-12-03  Alec Flett  <alecflett@chromium.org>
527
528         IndexedDB: remove IDBDatabaseBackendInterface::transaction()
529         https://bugs.webkit.org/show_bug.cgi?id=102733
530
531         Reviewed by Darin Fisher.
532
533         Part 3 of a refactor, remove the old transaction() method.
534
535         No new tests as this is just post-refactor cleanup.
536
537         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
538         (IDBDatabaseBackendInterface):
539
540 2012-12-03  Andrey Adaikin  <aandrey@chromium.org>
541
542         Web Inspector: [Canvas] show replay screenshot of the last call's canvas
543         https://bugs.webkit.org/show_bug.cgi?id=103739
544
545         Reviewed by Pavel Feldman.
546
547         When many canvases are being instrumented we'll want to show replay screenshots for each canvas.
548         Meanwhile, show the screenshot of the last-touched canvas during the current replay.
549
550         * inspector/InjectedScriptCanvasModuleSource.js:
551         (.):
552
553 2012-12-03  Joshua Bell  <jsbell@chromium.org>
554
555         IndexedDB: Rename exception enum members from UGLY_ERR to PrettyError
556         https://bugs.webkit.org/show_bug.cgi?id=103759
557
558         Reviewed by Darin Fisher.
559
560         Now that IDBDatabaseException isn't exposed to script with constants, the exception types
561         can be renamed to match the much friendlier names used in newer iterations of the spec. Also
562         remove the legacy/unused types.
563
564         No new tests, just constant renames.
565
566         * Modules/indexeddb/IDBCursor.cpp:
567         (WebCore::IDBCursor::update):
568         (WebCore::IDBCursor::advance):
569         (WebCore::IDBCursor::continueFunction):
570         (WebCore::IDBCursor::deleteFunction):
571         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
572         (WebCore::IDBCursorBackendImpl::continueFunction):
573         (WebCore::IDBCursorBackendImpl::advance):
574         (WebCore::IDBCursorBackendImpl::prefetchContinue):
575         * Modules/indexeddb/IDBDatabase.cpp:
576         (WebCore::IDBDatabase::createObjectStore):
577         (WebCore::IDBDatabase::deleteObjectStore):
578         (WebCore::IDBDatabase::transaction):
579         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
580         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
581         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
582         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
583         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
584         (WebCore::IDBDatabaseBackendImpl::openConnection):
585         (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
586         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
587         (WebCore::IDBDatabaseBackendImpl::close):
588         * Modules/indexeddb/IDBDatabaseException.cpp: Tidying and renaming.
589         (WebCore):
590         (WebCore::getErrorEntry):
591         * Modules/indexeddb/IDBDatabaseException.h:
592         * Modules/indexeddb/IDBFactory.cpp:
593         (WebCore::IDBFactory::cmp):
594         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
595         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
596         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
597         (WebCore::IDBFactoryBackendImpl::open):
598         * Modules/indexeddb/IDBIndex.cpp:
599         (WebCore::IDBIndex::openCursor):
600         (WebCore::IDBIndex::count):
601         (WebCore::IDBIndex::openKeyCursor):
602         (WebCore::IDBIndex::get):
603         (WebCore::IDBIndex::getKey):
604         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
605         (WebCore::IDBIndexBackendImpl::openCursor):
606         (WebCore::IDBIndexBackendImpl::openKeyCursor):
607         (WebCore::IDBIndexBackendImpl::count):
608         (WebCore::IDBIndexBackendImpl::get):
609         (WebCore::IDBIndexBackendImpl::getKey):
610         * Modules/indexeddb/IDBKeyRange.cpp:
611         (WebCore::IDBKeyRange::only):
612         (WebCore::IDBKeyRange::lowerBound):
613         (WebCore::IDBKeyRange::upperBound):
614         (WebCore::IDBKeyRange::bound):
615         * Modules/indexeddb/IDBObjectStore.cpp:
616         (WebCore::IDBObjectStore::get):
617         (WebCore::IDBObjectStore::put):
618         (WebCore::IDBObjectStore::deleteFunction):
619         (WebCore::IDBObjectStore::clear):
620         (WebCore):
621         (WebCore::IDBObjectStore::createIndex):
622         (WebCore::IDBObjectStore::index):
623         (WebCore::IDBObjectStore::deleteIndex):
624         (WebCore::IDBObjectStore::openCursor):
625         (WebCore::IDBObjectStore::count):
626         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
627         (WebCore::IDBObjectStoreBackendImpl::get):
628         (WebCore::IDBObjectStoreBackendImpl::put):
629         (WebCore):
630         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
631         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
632         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
633         (WebCore::IDBObjectStoreBackendImpl::clear):
634         (WebCore::IDBObjectStoreBackendImpl::createIndex):
635         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
636         (WebCore::IDBObjectStoreBackendImpl::openCursor):
637         (WebCore::IDBObjectStoreBackendImpl::count):
638         * Modules/indexeddb/IDBOpenDBRequest.cpp:
639         (WebCore::IDBOpenDBRequest::dispatchEvent):
640         * Modules/indexeddb/IDBRequest.cpp:
641         (WebCore::IDBRequest::result):
642         (WebCore::IDBRequest::error):
643         (WebCore::IDBRequest::errorCode):
644         (WebCore::IDBRequest::webkitErrorMessage):
645         (WebCore::IDBRequest::abort):
646         (WebCore::IDBRequest::dispatchEvent):
647         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
648         * Modules/indexeddb/IDBTransaction.cpp:
649         (WebCore::IDBTransaction::objectStore):
650         (WebCore::IDBTransaction::abort):
651         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
652         (WebCore::IDBTransactionBackendImpl::objectStore):
653         (WebCore::IDBTransactionBackendImpl::abort):
654         (WebCore::IDBTransactionBackendImpl::commit):
655
656 2012-12-03  Alexis Menard  <alexis@webkit.org>
657
658         [Mac] Enable CSS3 background-position offset by default.
659         https://bugs.webkit.org/show_bug.cgi?id=103905
660
661         Reviewed by Simon Fraser.
662
663         Turn the flag on by default.
664
665         No new tests : covered by tests landed previously.
666
667         * Configurations/FeatureDefines.xcconfig:
668         * css/CSSToStyleMap.cpp:
669         (WebCore::CSSToStyleMap::mapFillXPosition): Build fix in release on Mac with unused variable.
670         (WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
671
672 2012-12-03  Jan Keromnes  <janx@linux.com>
673
674         Web Inspector: Implement context menus in CodeMirrorTextEditor
675         https://bugs.webkit.org/show_bug.cgi?id=94062
676
677         Reviewed by Pavel Feldman.
678
679         Listen for contextmenu events in the editor and handle them differently
680         if triggered on gutter line number or in text body. This adds controls
681         for breakpoints (including disabled / conditional), debugger navigation
682         and text input methods.
683
684         * inspector/front-end/CodeMirrorTextEditor.js:
685         (WebInspector.CodeMirrorTextEditor):
686         (WebInspector.CodeMirrorTextEditor.prototype._contextMenu):
687
688 2012-12-03  Nate Chapin  <japhet@chromium.org>
689
690         Make MainResourceLoader not use m_frame directly.
691         https://bugs.webkit.org/show_bug.cgi?id=103907
692
693         Reviewed by Darin Adler.
694
695         MainResourceLoader will soon cease to be a ResourceLoader subclass.  It currently
696         makes extensively use of both m_documentLoader and m_frame from ResourceLoader.
697         By moving everything over to going through m_documentLoader, we reduce the number
698         of members we have to add to MainResourceLoader in https://bugs.webkit.org/show_bug.cgi?id=49246.
699
700         No new tests, refactor only.
701
702         * loader/DocumentLoader.cpp:
703         (WebCore::DocumentLoader::startLoadingMainResource):
704         * loader/MainResourceLoader.cpp:
705         (WebCore::MainResourceLoader::MainResourceLoader):
706         (WebCore::MainResourceLoader::create):
707         (WebCore::MainResourceLoader::receivedError):
708         (WebCore::MainResourceLoader::willSendRequest):
709         (WebCore::MainResourceLoader::continueAfterContentPolicy):
710         (WebCore::MainResourceLoader::didReceiveResponse):
711         (WebCore::MainResourceLoader::didReceiveData):
712         (WebCore::MainResourceLoader::startDataLoadTimer):
713         * loader/MainResourceLoader.h:
714         (MainResourceLoader):
715
716 2012-12-03  Anton Vayvod  <avayvod@chromium.org>
717
718         Text Autosizing: don't autosize horizontal menu items implemented via floating list items
719         https://bugs.webkit.org/show_bug.cgi?id=103840
720
721         Reviewed by Kenneth Rohde Christiansen.
722
723         Floating list items are often used to implement horizontal menus. Currently, text autosizing 
724         disregards such elements as autosizing containers. List items are often then autosized as part
725         of a bigger cluster (usually the whole page) and look too big.
726         This change turns floating list items into autosizing clusters so they are autosized separately
727         resulting in no font size multiplication for menu items implemented in this manner.
728
729         Test: fast/text-autosizing/cluster-list-item.html
730
731         * rendering/TextAutosizer.cpp:
732         (WebCore::TextAutosizer::isAutosizingContainer): Returns true for floating list items; split the
733         condition logically.
734
735 2012-12-03  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
736
737         Optimization in image decoding
738         https://bugs.webkit.org/show_bug.cgi?id=88424
739
740         Reviewed by Brent Fulgham.
741
742         Replace int with J_COLOR_SPACE in parameters of templates setPixel and
743         outputScanlines to avoid casting from int to enum. It required move 
744         inclusion of jpeglib.h and related #if to JPEGImageDecoder.h .
745
746         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
747         (WebCore):
748         (WebCore::setPixel):
749         (WebCore::JPEGImageDecoder::outputScanlines):
750         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
751         (JPEGImageDecoder):
752
753 2012-12-03  Tony Chang  <tony@chromium.org>
754
755         [mathml] Improve performance of nested sup or sub elements
756         https://bugs.webkit.org/show_bug.cgi?id=103665
757
758         Reviewed by Darin Adler.
759
760         Reduce the number of extra layouts. Since RenderMathMLSubSup calls
761         layout twice, this can lead to an exponential number of layouts. Avoid
762         extra layouts.
763
764         Test: mathml/presentation/sup-nested.html - Should not time out.
765
766         * css/mathml.css:
767         (msup): Stretching children also causes extra layouts. Avoid this by aligning to the top.
768         (msub): Same as msup, but align to the bottom.
769         * rendering/mathml/RenderMathMLSubSup.cpp:
770         (WebCore::RenderMathMLSubSup::layout): Only do the second layout if the padding changed.
771         Also fix up the calls to setNeedsLayout (since we're calling it on this) and
772         setChildNeedsLayout (since we're calling it on a child).
773
774 2012-12-03  Konrad Piascik  <kpiascik@rim.com>
775
776         Web Inspector: free Page resources on inspector disconnect
777         https://bugs.webkit.org/show_bug.cgi?id=103888
778
779         Reviewed by Yury Semikhatsky.
780
781         We don't need to keep the page around and can free up memory when disconnecting web inspector.
782
783         Not testable.
784
785         * inspector/InspectorController.cpp:
786         (WebCore::InspectorController::disconnectFrontend):
787         * inspector/InspectorOverlay.cpp:
788         (WebCore::InspectorOverlay::freePage):
789         (WebCore):
790         * inspector/InspectorOverlay.h:
791         (InspectorOverlay):
792
793 2012-12-03  Alexis Menard  <alexis@webkit.org>
794
795         [GTK] Enable CSS3 background-background position offset by default.
796         https://bugs.webkit.org/show_bug.cgi?id=103903
797
798         Reviewed by Philippe Normand.
799
800         Turn the feature on by default.
801
802         No new tests : covered by tests already landed.
803
804         * GNUmakefile.features.am:
805
806 2012-12-03  Hajime Morrita  <morrita@google.com>
807
808         Corrupted DOM tree during appendChild/insertBefore
809         https://bugs.webkit.org/show_bug.cgi?id=103601
810
811         Reviewed by Abhishek Arya.
812
813         There are some missing protection in appendChild() and insertBefore().
814         This change added these.
815
816         Dromaeo dom-modify shows no speed regression (5445run/s before vs 5351run/s after)
817
818         Tests: fast/events/mutation-during-append-child.html
819                fast/events/mutation-during-insert-before.html
820
821         * dom/ContainerNode.cpp:
822         (WebCore::checkAcceptChildGuaranteedNodeTypes):
823         (WebCore):
824         (WebCore::ContainerNode::insertBefore):
825         (WebCore::ContainerNode::appendChild):
826
827 2012-12-03  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
828
829         Document::initSecurityContext() fails to call securityOrigin().grantLoadLocalResources()
830         https://bugs.webkit.org/show_bug.cgi?id=68711
831
832         Reviewed by Adam Barth.
833
834         It currently fails since Document::loader() will return 0 until
835         Frame::setDocument is called and we are doing this check before it happens.
836
837         Delay the check and let the FrameLoader take care of doing grantLoadLocalResources()
838         on the Document along with other header checks in FrameLoader::didBeginDocument.
839
840         * dom/Document.cpp:
841         (WebCore::Document::initSecurityContext):
842         * loader/FrameLoader.cpp:
843         (WebCore::FrameLoader::didBeginDocument):
844
845 2012-12-03  Yong Li  <yoli@rim.com>
846
847         ENABLE(IMAGE_DECODER_DOWN_SAMPLING): Should use TURBO_JPEG_RGB_SWIZZLE fast path for non-scaled images
848         https://bugs.webkit.org/show_bug.cgi?id=103749
849
850         Reviewed by Rob Buis.
851
852         Replace !ENABLE(IMAGE_DECODER_DOWN_SAMPLING) with !m_scaled.
853
854         No new tests as existing jpegs are good with IMAGE_DECODER_DOWN_SAMPLING set up.
855
856         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
857         (WebCore::JPEGImageDecoder::outputScanlines):
858
859 2012-12-03  Tommy Widenflycht  <tommyw@google.com>
860
861         Speech Recognition API: Update SpeechRecognitionEvent to match the specification
862         https://bugs.webkit.org/show_bug.cgi?id=103407
863
864         Reviewed by Kentaro Hara.
865
866         Specification for the Speech Recognition API:
867         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
868
869         This patch does the following:
870         o Adds results, and removing result, on SpeechRecognitionEvent
871         o Renaming SpeechRecognitionResult::final to isFinal
872         o Removing emma from SpeechRecognitionResult
873
874         The emma attribute is supposed to move from SpeechRecognitionResult to the SpeechRecognitionEvent,
875         but that caused GC issues for unrelated code so it will be added later when properly fixed.
876
877         Existing tests updated to test the new API.
878
879         * Modules/speech/SpeechRecognition.cpp:
880         (WebCore::SpeechRecognition::start):
881         (WebCore::SpeechRecognition::didReceiveResults):
882         (WebCore):
883         * Modules/speech/SpeechRecognition.h:
884         (SpeechRecognition):
885         * Modules/speech/SpeechRecognitionEvent.cpp:
886         (WebCore::SpeechRecognitionEvent::createResult):
887         (WebCore):
888         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
889         (WebCore::SpeechRecognitionEvent::~SpeechRecognitionEvent):
890         * Modules/speech/SpeechRecognitionEvent.h:
891         (SpeechRecognitionEventInit):
892         (SpeechRecognitionEvent):
893         (WebCore::SpeechRecognitionEvent::resultIndex):
894         (WebCore::SpeechRecognitionEvent::results):
895         * Modules/speech/SpeechRecognitionEvent.idl:
896         * Modules/speech/SpeechRecognitionResult.cpp:
897         * Modules/speech/SpeechRecognitionResult.h:
898         (WebCore::SpeechRecognitionResult::isFinal):
899         (SpeechRecognitionResult):
900         * Modules/speech/SpeechRecognitionResult.idl:
901         * WebCore.gypi:
902         * bindings/js/JSDictionary.cpp:
903         (WebCore::JSDictionary::convertValue):
904         (WebCore):
905         * bindings/js/JSDictionary.h:
906         * bindings/v8/Dictionary.cpp:
907         (WebCore::Dictionary::get):
908         (WebCore):
909         * bindings/v8/Dictionary.h:
910         (Dictionary):
911         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp: Removed.
912
913 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
914
915         Unreviewed, rolling out r136377.
916         http://trac.webkit.org/changeset/136377
917         https://bugs.webkit.org/show_bug.cgi?id=103881
918
919         Causes crashes on debug builds that use JSC. (Requested by
920         mkwst on #webkit).
921
922         * Modules/websockets/WebSocket.cpp:
923         (WebCore::WebSocket::connect):
924         * Modules/websockets/WebSocketChannel.cpp:
925         (WebCore::WebSocketChannel::didFailSocketStream):
926         * css/MediaList.cpp:
927         (WebCore::addResolutionWarningMessageToConsole):
928         * dom/Document.cpp:
929         (WebCore::Document::logExceptionToConsole):
930         (WebCore::Document::processHttpEquiv):
931         * dom/Document.h:
932         (Document):
933         * dom/ScriptExecutionContext.h:
934         (ScriptExecutionContext):
935         * dom/ViewportArguments.cpp:
936         (WebCore):
937         (WebCore::parserLineNumber):
938         (WebCore::reportViewportWarning):
939         * html/HTMLFormElement.cpp:
940         (WebCore::HTMLFormElement::validateInteractively):
941         * html/HTMLIFrameElement.cpp:
942         (WebCore::HTMLIFrameElement::parseAttribute):
943         * html/canvas/WebGLRenderingContext.cpp:
944         (WebCore):
945         (WebCore::WebGLRenderingContext::printWarningToConsole):
946         * inspector/ConsoleMessage.cpp:
947         (WebCore::ConsoleMessage::ConsoleMessage):
948         * inspector/ConsoleMessage.h:
949         (ConsoleMessage):
950         * inspector/InspectorConsoleAgent.cpp:
951         (WebCore::InspectorConsoleAgent::enable):
952         (WebCore::InspectorConsoleAgent::addMessageToConsole):
953         (WebCore::InspectorConsoleAgent::count):
954         * loader/FrameLoader.cpp:
955         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
956         * loader/MainResourceLoader.cpp:
957         (WebCore::MainResourceLoader::didReceiveResponse):
958         * page/Console.cpp:
959         * page/Console.h:
960         (Console):
961         * page/DOMWindow.cpp:
962         (WebCore::DOMWindow::printErrorMessage):
963         * svg/SVGDocumentExtensions.cpp:
964         (WebCore):
965         (WebCore::parserLineNumber):
966         (WebCore::reportMessage):
967         * workers/WorkerContext.cpp:
968         * workers/WorkerContext.h:
969         (WorkerContext):
970
971 2012-12-03  Kihong Kwon  <kihong.kwon@samsung.com>
972
973         Remove useless included header and change position of Proximity Events test cases
974         https://bugs.webkit.org/show_bug.cgi?id=103871
975
976         Reviewed by Antonio Gomes.
977
978         Remove useless included header from DeviceProximityEvent.cpp.
979
980         No new tests, It is just code refactoring.
981
982         * Modules/proximity/DeviceProximityEvent.cpp:
983
984 2012-12-03  Jussi Kukkonen  <jussi.kukkonen@intel.com>
985
986         [GStreamer] initial volume events on media elements should happen earlier
987         https://bugs.webkit.org/show_bug.cgi?id=96912
988
989         Reviewed by Philippe Normand.
990
991         Update mediaelement volume and mute properties to whatever values
992         playbin has as soon as possible (when the playbin reaches PAUSED state).
993         This will improve user experience as the volume visuals won't suddenly
994         change when user clicks play.
995
996         No new tests: media/event-attributes.html already tests media events.
997         Unfortunately this test is flaky on EFL and GTK (more specifically
998         it is flaky on pulseaudio-using gstreamer platforms: http://webkit.org/b/83704).
999
1000         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1001         (WebCore::MediaPlayerPrivateGStreamer::load):
1002         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1003         (MediaPlayerPrivateGStreamer):
1004
1005 2012-12-03  Alexis Menard  <alexis@webkit.org>
1006
1007         Unreviewed build fix after r136378.
1008
1009         * css/CSSPrimitiveValueMappings.h:
1010         (WebCore):
1011         (WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
1012
1013 2012-12-03  Alexis Menard  <alexis@webkit.org>
1014
1015         [CSS3 Backgrounds and Borders] Implement CSS3 background-position offsets rendering.
1016         https://bugs.webkit.org/show_bug.cgi?id=103440
1017
1018         Reviewed by Julien Chaffraix.
1019
1020         Add the rendering bits of the new background-position offsets. It adds
1021         new bits in FillLayer to store the edges used to position the
1022         background. The old x and y members are used the same way as before, to
1023         store the value of the offset.
1024
1025         Test: fast/backgrounds/background-position-rendering.html
1026
1027         * css/CSSComputedStyleDeclaration.cpp:
1028         (WebCore::createPositionListForLayer): Refactor into a function the
1029         code duplicated in getPropertyCSSValue to avoid more code
1030         duplication.
1031         (WebCore):
1032         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1033         * css/CSSPrimitiveValueMappings.h:
1034         (WebCore):
1035         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1036         Add implicit conversion from the enums used in the rendering code to
1037         CSS values.
1038         (WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
1039         * css/CSSToStyleMap.cpp:
1040         (WebCore::CSSToStyleMap::mapFillXPosition):
1041         (WebCore::CSSToStyleMap::mapFillYPosition):
1042         * rendering/RenderBoxModelObject.cpp:
1043         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Add
1044         support for the new positioning and refactor a little naming of the
1045         variables for better readability.
1046         * rendering/style/FillLayer.cpp:
1047         (SameSizeAsFillLayer):
1048         (WebCore::FillLayer::FillLayer):
1049         (WebCore::FillLayer::operator=):
1050         (WebCore::FillLayer::operator==):
1051         (WebCore::FillLayer::fillUnsetProperties):
1052         (WebCore::FillLayer::fillUnsetProperties): When filling the layer with
1053         unset properties make sure we also set the x and y origins of the
1054         background in case they were set.
1055         * rendering/style/FillLayer.h:
1056         (WebCore::FillLayer::backgroundXOrigin):
1057         (WebCore::FillLayer::backgroundYOrigin):
1058         (WebCore::FillLayer::isBackgroundOriginSet):
1059         (FillLayer):
1060         (WebCore::FillLayer::setBackgroundXOrigin):
1061         (WebCore::FillLayer::setBackgroundYOrigin):
1062         (WebCore::FillLayer::clearPositionX):
1063         (WebCore::FillLayer::clearPositionY):
1064         * rendering/style/RenderStyleConstants.h:
1065
1066 2012-12-03  Mike West  <mkwst@chromium.org>
1067
1068         Web Inspector: Autogenerate stack traces and line numbers when possible.
1069         https://bugs.webkit.org/show_bug.cgi?id=100650
1070
1071         Reviewed by Yury Semikhatsky.
1072
1073         Console messages generated in WebCore generally are asked to do a bit of
1074         work in order to provide a developer with a detailed report. We ask the
1075         caller to either generate stack traces, or pass in a url/line number
1076         pair, which can be a bit of work. Predictably, most callers don't pass
1077         in what we'd like to see.
1078
1079         This patch creates a new, simpler console message generation API that we
1080         expect most call sites to use. Source, type, level, and message are
1081         required, and an optional request ID can be passed in. Everything else
1082         will be autogenerated inside ConsoleMessage when appropriate.
1083
1084         In a subsequent patch, we expect to be able to trim down more of the
1085         external call sites (ContentSecurityPolicy springs to mind) in order to
1086         further consolidate the external interface. Simple is good.
1087
1088         * Modules/websockets/WebSocket.cpp:
1089         (WebCore::WebSocket::connect):
1090         * Modules/websockets/WebSocketChannel.cpp:
1091         (WebCore::WebSocketChannel::didFailSocketStream):
1092             Drop the now-redundant URL parameter from various WebSocket errors.
1093         * css/MediaList.cpp:
1094         (WebCore::addResolutionWarningMessageToConsole):
1095             Switch to Document::addConsoleMessage, which means that we can move
1096             line-number generation out of MediaList.
1097         * dom/Document.cpp:
1098         (WebCore::Document::logExceptionToConsole):
1099             Use the long-form 'addMessage()' rather than the public interface.
1100         (WebCore::Document::processHttpEquiv):
1101             Drop the URL parameter, as it's now autogenerated.
1102         (WebCore::Document::addConsoleMessage):
1103         (WebCore):
1104         * dom/Document.h:
1105         (Document):
1106             Override the pure virtual method on ScriptExecutionContext, and pass
1107             the call through to the new Console::addMessage, which accepts a
1108             pointer to the Document in order to do line-number generation.
1109         * dom/ScriptExecutionContext.h:
1110         (ScriptExecutionContext):
1111             Add a pure virtual variant of addConsoleMessage which accepts only
1112             bare minimum data, and expects autogeneration of the rest.
1113             Additionally, ensure that the other variants always have either a
1114             URL/line number, or a stack trace.
1115         * dom/ViewportArguments.cpp:
1116         (WebCore::reportViewportWarning):
1117             Drop line numbers and URLs from Viewport warnings. We can generate
1118             these now.
1119         * html/HTMLFormElement.cpp:
1120         (WebCore::HTMLFormElement::validateInteractively):
1121             Drop the URL from form autofocus warnings
1122         * html/HTMLIFrameElement.cpp:
1123         (WebCore::HTMLIFrameElement::parseAttribute):
1124             Drop the URL and line from sandbox attribute warnings.
1125         * html/canvas/WebGLRenderingContext.cpp:
1126         (WebCore):
1127         (WebCore::WebGLRenderingContext::printWarningToConsole):
1128             Drop the URL from WebGL warnings.
1129         * inspector/ConsoleMessage.cpp:
1130         (WebCore::ConsoleMessage::ConsoleMessage):
1131             Call 'autogenerateMetadata' to ensure that a stack trace is
1132             generated if one isn't provided. Create a new constructor that
1133             accepts a ScriptState/ScriptArguments pair, and use it for console
1134             API calls.
1135         (WebCore):
1136         (WebCore::ConsoleMessage::autogenerateMetadata):
1137             Generate a stack trace given whatever information we've got.
1138         * inspector/ConsoleMessage.h:
1139         (ConsoleMessage):
1140             Create a new constructor that accepts a ScriptState/ScriptArguments
1141             pair, and use it for console API calls.
1142         * inspector/InspectorConsoleAgent.cpp:
1143         (WebCore::InspectorConsoleAgent::enable):
1144             Use the short-form ConsoleMessage constructor.
1145         (WebCore::InspectorConsoleAgent::addMessageToConsole):
1146             Use the stack-only constructor, or the ScriptState
1147             constructor, as appropriate.
1148         (WebCore::InspectorConsoleAgent::count):
1149             We generated a stack, pass it in.
1150         * loader/FrameLoader.cpp:
1151         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1152         * loader/MainResourceLoader.cpp:
1153         (WebCore::MainResourceLoader::didReceiveResponse):
1154             Drop the URL parameter from the console message for X-Frame-Options
1155             parsing errors.
1156         * page/Console.cpp:
1157         (WebCore::Console::addMessage):
1158             When given a Document*, generate a line number if: 1) the document
1159             is still being parsed, 2) the document is not in document.write(),
1160             3) the parser isn't waiting for script, and 4) the parser isn't
1161             executing script. Many callsites didn't check all of these, which
1162             is why the SVG rebaseline (for example) drops lots and lots of line
1163             numbers which point at a closing '</script>' tag.
1164         (WebCore):
1165         * page/Console.h:
1166         (WebCore):
1167         (Console):
1168             Update the public API to accept a Document* and little else.
1169         * page/DOMWindow.cpp:
1170         (WebCore::DOMWindow::printErrorMessage):
1171             Don't generate a stack here. We can do it later.
1172         * svg/SVGDocumentExtensions.cpp:
1173         (WebCore::reportMessage):
1174             Drop the URL and line number. We'll generate them. It'll be sweet.
1175         * workers/WorkerContext.cpp:
1176         (WebCore::WorkerContext::addConsoleMessage):
1177             Generate a stack here, as we likely won't have the context to do
1178             so later. Pass it through.
1179         (WebCore):
1180         * workers/WorkerContext.h:
1181         (WorkerContext):
1182             Implement the new addConsoleMessage variant.
1183
1184 2012-12-03  Gabor Rapcsanyi  <rgabor@webkit.org>
1185
1186         [Qt] Remove an unnecessary masking from swapBgrToRgb()
1187         https://bugs.webkit.org/show_bug.cgi?id=103630
1188
1189         Reviewed by Zoltan Herczeg.
1190
1191         Get rid of a masking command in swapBgrToRgb() to speed up a little bit.
1192
1193         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1194         (WebCore::swapBgrToRgb):
1195
1196 2012-12-03  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1197
1198         CSS Device Adaptation: window.innerWidth returns wrong value if CSS viewport descriptors are applied
1199         https://bugs.webkit.org/show_bug.cgi?id=103737
1200
1201         Reviewed by Kenneth Rohde Christiansen.
1202
1203         ViewportStyleResolver used frame view visibleContentRect size as initial viewport size.
1204         This however caused a problem when page enabled/disabled CSS stylesheets, having viewport
1205         descriptors. Viewport descriptors from new stylesheet were applied to the visibleContentRect
1206         affected already by the viewport descriptors from the previous stylesheet.
1207
1208         New 'initialViewportSize' property (http://dev.w3.org/csswg/css-device-adapt/#initial-viewport)
1209         was added to frame view so that viewport descriptors can always be applied to the reliable
1210         viewport size.
1211
1212         Test: css3/device-adapt/viewport-width-check-window-innerwidth-correct.html
1213
1214         * css/ViewportStyleResolver.cpp:
1215         (WebCore::ViewportStyleResolver::ViewportStyleResolver):
1216         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
1217         * css/ViewportStyleResolver.h:
1218         (ViewportStyleResolver):
1219         * dom/Document.cpp:
1220         (WebCore):
1221         (WebCore::Document::initialViewportSize):
1222         * dom/Document.h:
1223         (Document):
1224         * page/FrameView.h:
1225         (FrameView):
1226         (WebCore::FrameView::initialViewportSize):
1227         (WebCore::FrameView::setInitialViewportSize):
1228
1229 2012-12-03  Alexander Pavlov  <apavlov@chromium.org>
1230
1231         Web Inspector: [Styles] Retain selector case as written in the source code
1232         https://bugs.webkit.org/show_bug.cgi?id=103118
1233
1234         Reviewed by Antti Koivisto.
1235
1236         This change:
1237         - adds parsing of selector group components in the CSSParser;
1238         - builds the SelectorList.selectors based on the source code whenever possible.
1239           Strips [multiline] comments and whitespace;
1240         - adds the MultilineMode to RegularExpression.
1241
1242         Test: inspector/styles/selector-list.html
1243
1244         * WebCore.exp.in: Update the exported symbol.
1245         * css/CSSGrammar.y.in: Add invocations for CSSParser::markSelector[Start|End]() as required.
1246         * css/CSSParser.cpp:
1247         (WebCore::CSSParser::markSelectorStart): Gets invoked to mark a selector group item start offset.
1248         (WebCore::CSSParser::markSelectorEnd): Ditto for the end offset.
1249         * css/CSSParser.h: Add new methods and a SourceRange tracking field.
1250         * css/CSSPropertySourceData.h: Add SelectorRangeList to the CSSRuleSourceData.
1251         * inspector/InspectorStyleSheet.cpp:
1252         (WebCore::selectorsFromSource): Builds the SelectorList based on the underlying source data.
1253         Strips comments and whitespace from selectors.
1254         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
1255         Builds SelectorList based on the availability of the source code.
1256         * inspector/front-end/StylesSidebarPane.js:
1257         (WebInspector.StylePropertiesSection.prototype._markSelectorMatches):
1258         Update selectors in all cases to make use of the source-based information whenever possible.
1259         * platform/text/RegularExpression.cpp:
1260         Add the MultilineMode parameter into the constructor/factory method and ultimately pass it into YarrPattern.
1261         (WebCore::RegularExpression::Private::create): See above.
1262         (WebCore::RegularExpression::Private::Private): See above.
1263         (WebCore::RegularExpression::Private::compile): See above.
1264         (WebCore::RegularExpression::RegularExpression): See above.
1265         * platform/text/RegularExpression.h:
1266         Add enum MultilineMode, modify constructor and factory method signatures accordingly.
1267
1268 2012-12-02  Noel Gordon  <noel.gordon@gmail.com>
1269
1270         ImageOrientation::transformFromDefault() case labels should be in numerical order
1271         https://bugs.webkit.org/show_bug.cgi?id=101596
1272
1273         Reviewed by Simon Fraser.
1274
1275         Place the orientation case labels in numerical order to better match the EXIF2.2 spec
1276         definitions of orientation values and their ImageOrientation.h enumeration.
1277
1278         No change in behavior. Covered by existing tests:
1279            fast/images/exif-orientation-css.html
1280            fast/images/exif-orientation-image-document.html
1281            fast/images/exif-orientation.html
1282
1283         * platform/graphics/ImageOrientation.cpp:
1284         (WebCore::ImageOrientation::transformFromDefault): Numerically order the orientation 
1285         case statement labels.
1286
1287 2012-12-02  Mary Wu  <mary.wu@torchmobile.com.cn>
1288
1289         should sniff it if mimetype don't contain a slash.
1290         https://bugs.webkit.org/show_bug.cgi?id=102778
1291
1292         Reviewed by George Staikos.
1293
1294         Based on http://mimesniff.spec.whatwg.org/, a valid media type
1295         is the string represented by concatenating type, the string "/",
1296         and subtype. So if the mimetype don't contain slash, we should
1297         possible get sniffed type from the content like Firefox/chrome/safari.
1298
1299         RIM Bug# 219590, internally reviewed by Liam Quinn.
1300
1301         No new tests, the patch only impact qt/blackberry porting to be consistent
1302         with chrome, other portings have their own behavior.
1303
1304         * platform/network/MIMESniffing.cpp:
1305         (std::isUnknownType):
1306
1307 2012-12-02  Otto Derek Cheung  <otcheung@rim.com>
1308
1309         [BlackBerry] Adding checks for null when checking cookie status in CookieJarBlackBerry
1310         https://bugs.webkit.org/show_bug.cgi?id=103748
1311
1312         Reviewed by Rob Buis.
1313
1314         The logic is flipped in the previous patch.
1315
1316         * loader/blackberry/CookieJarBlackBerry.cpp:
1317         (WebCore::cookiesEnabled):
1318
1319 2012-12-02  Robert Hogan  <robert@webkit.org>
1320
1321         Bad rendering of web page because of image's height is set to 100%
1322         https://bugs.webkit.org/show_bug.cgi?id=28035
1323
1324         Reviewed by Eric Seidel.
1325
1326         Call computeReplacedLogicalHeight() to get the correct logical height of a replaced element
1327         for calculating the element's width. RenderBox::computeLogicalHeightUsing() is a helper function designed for finding
1328         the min and max height values and is not the way to find the actual used height of a replaced element.
1329
1330         WebKit's quirks-mode behaviour for the test case is unaffected by this change.
1331
1332         Tests: fast/css/computed-image-width-with-percent-height-quirksmode.html
1333                fast/css/computed-image-width-with-percent-height.html
1334
1335         * rendering/RenderReplaced.cpp:
1336         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1337
1338 2012-12-02  Mihnea Ovidenie  <mihnea@adobe.com>
1339
1340         [CSS Regions] regionlayoutupdate event fires continuously
1341         https://bugs.webkit.org/show_bug.cgi?id=102101
1342
1343         Reviewed by David Hyatt.
1344
1345         According to the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#region-flow-layout-events, the regionlayoutupdate event
1346         should be dispatched when there is a possible layout change in the region chain.
1347         In the current implementation, regionlayoutupdate is dispatched when:
1348         1. a region from region chain changed its regionOverset value
1349         2. a region from region chain has regionOverset = fit| overset
1350
1351         In the case of a named flow having an auto-height region with regionOverset = fit, the second step of layout was done
1352         also when there was not required, therefore the regionlayoutuodate was unnecessary triggered.
1353
1354         We should proceed with the 2-pass layout only if the flow-thread having auto-height regions in region chain needs layout.
1355
1356         Test: fast/regions/autoheight-regionlayoutupdate-multipletimes.html
1357
1358         * rendering/FlowThreadController.cpp:
1359         (WebCore::FlowThreadController::hasRenderNamedFlowThreadsNeedingLayout):
1360         * rendering/FlowThreadController.h:
1361         * rendering/RenderView.cpp:
1362         (WebCore::RenderView::layout):
1363
1364 2012-12-02  Rik Cabanier  <cabanier@adobe.com>
1365
1366         Extend JavaScript support for blending in canvas
1367         https://bugs.webkit.org/show_bug.cgi?id=101804
1368
1369         Reviewed by Dirk Schulze.
1370
1371         Added parsing code and variables to support additional canvas blend modes
1372         see spec: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#canvascompositingandblending
1373
1374         Test: canvas/philip/tests/2d.composite.globalComposite.html
1375
1376         * html/HTMLImageElement.cpp:
1377         (WebCore::HTMLImageElement::parseAttribute):
1378         * html/canvas/CanvasRenderingContext2D.cpp:
1379         (WebCore::CanvasRenderingContext2D::State::State):
1380         (WebCore::CanvasRenderingContext2D::State::operator=):
1381         (WebCore::CanvasRenderingContext2D::globalCompositeOperation):
1382         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation):
1383         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
1384         * html/canvas/CanvasRenderingContext2D.h:
1385         (State):
1386         * platform/graphics/GraphicsTypes.cpp:
1387         (WebCore):
1388         (WebCore::parseCompositeAndBlendOperator):
1389         (WebCore::compositeOperatorName):
1390         * platform/graphics/GraphicsTypes.h:
1391
1392 2012-12-02  KyungTae Kim  <ktf.kim@samsung.com>
1393
1394         [EFL] Fix build warning in GraphicsContext3DEfl.cpp
1395         https://bugs.webkit.org/show_bug.cgi?id=103807
1396
1397         Reviewed by Laszlo Gombos.
1398
1399         Because GraphicsContext3D::ImageExtractor::extractImage is not implemented yet, 
1400         comment out the parameter names for removing -Wunused-parameter warnings.
1401
1402         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1403         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1404
1405 2012-12-02  Andreas Kling  <akling@apple.com>
1406
1407         Keep ElementAttributeData sharing cache open for a while after document parsing finishes.
1408         <http://webkit.org/b/103720>
1409
1410         Reviewed by Antti Koivisto.
1411
1412         Allow web pages that generate content dynamically to benefit more from the ElementAttributeData sharing
1413         cache by keeping it open for 10 seconds after document parsing finishes. This enables elements constructed
1414         from HTML fragments to share attribute data with other identical elements.
1415
1416         Elements created via Document.createElement are still unsupported since we don't know the list of attributes
1417         at the time of construction.
1418
1419         401kB progression on Membuster3.
1420
1421         Document now holds on to a DocumentSharedObjectPool, accessible via Document::sharedObjectPool().
1422         It is non-null during parsing and for some time afterwards, and can be used to implement additional
1423         caches that are not worth holding on to permanently.
1424
1425         * CMakeLists.txt:
1426         * GNUmakefile.list.am:
1427         * Target.pri:
1428         * WebCore.gypi:
1429         * WebCore.xcodeproj/project.pbxproj:
1430         * WebCore.vcproj/WebCore.vcproj:
1431
1432             Add new class DocumentSharedObjectPool.
1433
1434         * dom/Document.cpp:
1435         (WebCore::Document::Document):
1436         (WebCore::Document::setParsing):
1437         (WebCore::Document::finishedParsing):
1438         (WebCore::Document::sharedObjectPoolClearTimerFired):
1439         * dom/Document.h:
1440         (WebCore::Document::sharedObjectPool):
1441
1442             Create DocumentSharedObjectPool when parsing starts, kill it on a 10s timer after parsing finishes.
1443
1444         * dom/DocumentSharedObjectPool.cpp: Added.
1445         (ImmutableElementAttributeDataCacheKey):
1446         (WebCore::ImmutableElementAttributeDataCacheKey::ImmutableElementAttributeDataCacheKey):
1447         (WebCore::ImmutableElementAttributeDataCacheKey::operator!=):
1448         (WebCore::ImmutableElementAttributeDataCacheKey::hash):
1449         (ImmutableElementAttributeDataCacheEntry):
1450         (WebCore::ImmutableElementAttributeDataCacheEntry::ImmutableElementAttributeDataCacheEntry):
1451         (WebCore::DocumentSharedObjectPool::cachedImmutableElementAttributeData):
1452         (WebCore::DocumentSharedObjectPool::DocumentSharedObjectPool):
1453         (WebCore::DocumentSharedObjectPool::~DocumentSharedObjectPool):
1454         * dom/DocumentSharedObjectPool.h: Added.
1455         (DocumentSharedObjectPool):
1456         (WebCore::DocumentSharedObjectPool::create):
1457         * dom/Element.cpp:
1458         (WebCore::Element::parserSetAttributes):
1459
1460             Moved the ElementAttributeData cache to DocumentSharedObjectPool.
1461
1462 2012-12-02  John Bauman  <jbauman@chromium.org>
1463
1464         [chromium] Let Pepper Flash use integrated GPU
1465         https://bugs.webkit.org/show_bug.cgi?id=103800
1466
1467         Reviewed by Kenneth Russell.
1468
1469         Pepper Flash uses the SharedGraphicsContext3D as a parent, so don't
1470         require that to use the discrete GPU. This means that accelerated
1471         canvas will use the integrated GPU, but that will save battery life
1472         and seems acceptable. 
1473
1474         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
1475         (WebCore::SharedGraphicsContext3DImpl::createContext):
1476
1477 2012-12-02  Elliott Sprehn  <esprehn@gmail.com>
1478
1479         documentElement should not always get a renderer
1480         https://bugs.webkit.org/show_bug.cgi?id=103475
1481
1482         Reviewed by Ojan Vafai.
1483
1484         Only SVG documents need a renderer on the documentElement when it's
1485         display: none. This behavior is wrong, but there's assumptions in
1486         FrameView and SVGImage that depend on a RenderSVGRoot existing for all
1487         loaded SVG document and images.
1488
1489         The current code has logic that makes it appear as if we always create
1490         a renderer for the documentElement even when it's display: none, but
1491         because HTMLElement::createRenderer doesn't call super we end up with
1492         HTMLElement::rendererIsNeeded returning true for display: none, but
1493         HTMLElement::createRenderer returning null.
1494
1495         Instead of this generic documentElement logic only special case SVG
1496         until someone can fix Bug 103493 so we don't need it.
1497
1498         Test: fast/css/display-none-documentElement.html
1499
1500         * dom/Element.cpp:
1501         (WebCore::Element::rendererIsNeeded):
1502         (WebCore::Element::createRenderer):
1503         * svg/SVGSVGElement.cpp:
1504         (WebCore::SVGSVGElement::rendererIsNeeded):
1505         * svg/SVGSVGElement.h:
1506         (SVGSVGElement):
1507
1508 2012-12-02  Pan Deng  <pan.deng@intel.com>
1509
1510         [Resource Timing] implementation of cross origin resouce timing restrictions.
1511         https://bugs.webkit.org/show_bug.cgi?id=84886.
1512
1513         Reviewed by Tony Gentilcore.
1514
1515         This patch implemented resource timing behaviors of cross origin. By default, detailed timing info is hided in cross origin resource timing, only startTime, duration, fetchStart and responseEnd can be observed. Exceptions are, server side allow its origin can be timing by another through a header with "timing-allow-origin" field.
1516
1517         Tests: http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html
1518                http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html
1519
1520         * page/Performance.cpp:
1521         (WebCore::passesTimingAllowCheck):
1522         (WebCore):
1523         (WebCore::Performance::addResourceTiming):
1524         * page/Performance.h:
1525         (WebCore):
1526         (Performance):
1527         * page/PerformanceResourceTiming.cpp:
1528         (WebCore):
1529         * page/PerformanceResourceTiming.h:
1530         (WebCore::PerformanceResourceTiming::create):
1531         (PerformanceResourceTiming):
1532
1533 2012-12-02  Elliott Sprehn  <esprehn@gmail.com>
1534
1535         Simplify treeScope and setTreeScope
1536         https://bugs.webkit.org/show_bug.cgi?id=103708
1537
1538         Reviewed by Hajime Morita.
1539
1540         By making the default treeScope in NodeRareData the document and then
1541         moving the m_treeScope field to NodeRareDataBase we can make treeScope
1542         inline and make setTreeScope much simpler.
1543
1544         There's also no reason to save calls to rareData() now that the map has
1545         been eliminated by r133372 so we can eliminate the return value from
1546         setTreeScope.
1547
1548         No new tests, just refactoring.
1549
1550         * WebCore.exp.in:
1551         * dom/Document.h:
1552         (WebCore::Node::treeScope):
1553         (WebCore):
1554         * dom/Element.cpp:
1555         (WebCore::Element::createRareData):
1556         * dom/ElementRareData.h:
1557         (ElementRareData):
1558         (WebCore::ElementRareData::ElementRareData):
1559         * dom/Node.cpp:
1560         (WebCore::Node::setTreeScope):
1561         (WebCore::Node::createRareData):
1562         * dom/Node.h:
1563         (NodeRareDataBase):
1564         (WebCore::NodeRareDataBase::treeScope):
1565         (WebCore::NodeRareDataBase::setTreeScope):
1566         (WebCore::NodeRareDataBase::NodeRareDataBase):
1567         (Node):
1568         * dom/NodeRareData.cpp:
1569         (WebCore::NodeRareData::reportMemoryUsage):
1570         * dom/NodeRareData.h:
1571         (WebCore::NodeRareData::NodeRareData):
1572         (NodeRareData):
1573         * dom/TreeScopeAdopter.cpp:
1574         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1575
1576 2012-12-02  Justin Novosad  <junov@google.com>
1577
1578         Fix occlusion culling logic to handle css background layer clipping
1579         https://bugs.webkit.org/show_bug.cgi?id=103276
1580
1581         Reviewed by Simon Fraser.
1582
1583         Bug was introduced by r135629
1584         This patch fixes it by verifying layer clip.  A fill layer must
1585         not be treated as if it occludes the layers under it unless it has
1586         a larger or equal clip setting than the layers under it.
1587
1588         Test: fast/backgrounds/background-opaque-clipped-gradients.html
1589
1590         * rendering/RenderBox.cpp:
1591         (WebCore::RenderBox::paintFillLayers):
1592         * rendering/style/FillLayer.cpp:
1593         (WebCore::clipMax):
1594         (WebCore::FillLayer::computeClipMax):
1595         (WebCore::FillLayer::clipOccludesNextLayers):
1596         * rendering/style/FillLayer.h:
1597         (FillLayer):
1598
1599 2012-12-02  Tony Chang  <tony@chromium.org>
1600
1601         Avoid a second layout of flex items in layoutAndPlaceChildren()
1602         https://bugs.webkit.org/show_bug.cgi?id=102352
1603
1604         Reviewed by Ojan Vafai.
1605
1606         Avoid doing a second layout if we're going to get the same size as before.
1607         This prevents us from doing an exponential number of layouts in some
1608         common cases.
1609
1610         Test: css3/flexbox/stretch-after-sibling-size-change.html
1611
1612         * html/shadow/SliderThumbElement.cpp:
1613         (WebCore::RenderSliderContainer::layout): Force a layout of the track, which positions the thumb.
1614         * rendering/RenderFlexibleBox.cpp:
1615         (WebCore::RenderFlexibleBox::needToStretchChild): Determine if a child is going to stretch.
1616         (WebCore::RenderFlexibleBox::resetAutoMarginsAndLogicalTopInCrossAxis): Makes sure we're in a consistent state before
1617         we apply auto margins.
1618         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
1619         * rendering/RenderFlexibleBox.h: Add needToStretchChild.
1620
1621 2012-12-02  Yongjun Zhang  <yongjun_zhang@apple.com>
1622
1623         Need a method to close all idle localstorage databases immediately.
1624         https://bugs.webkit.org/show_bug.cgi?id=103469
1625
1626         Reviewed by David Kilzer.
1627
1628         Add a new PageGroup method closeIdleLocalStorageDatabases, which walks through
1629         all local storage areas that don't have document referencing to them and closes
1630         their underlying databases.
1631
1632         Test: storage/domstorage/localstorage/close-idle-localstorage-databases-immediately.html
1633
1634         * WebCore.exp.in:
1635         * page/PageGroup.cpp:
1636         (WebCore::PageGroup::clearLocalStorageForOrigin):
1637         (WebCore):
1638         (WebCore::PageGroup::closeIdleLocalStorageDatabases): walking through all idle local storages and
1639             closing their databases.
1640         * page/PageGroup.h:
1641         (PageGroup):
1642         * storage/StorageArea.h:
1643         (WebCore::StorageArea::closeDatabaseIfIdle):
1644         * storage/StorageAreaImpl.cpp:
1645         (WebCore::StorageAreaImpl::closeDatabaseIfIdle): close the database if it is idle.
1646         (WebCore):
1647         * storage/StorageAreaImpl.h:
1648         (StorageAreaImpl):
1649         * storage/StorageNamespace.h:
1650         (StorageNamespace):
1651         * storage/StorageNamespaceImpl.cpp:
1652         (WebCore::StorageNamespaceImpl::closeIdleLocalStorageDatabases):
1653         (WebCore):
1654         * storage/StorageNamespaceImpl.h:
1655         (StorageNamespaceImpl):
1656
1657 2012-12-02  Otto Derek Cheung  <otcheung@rim.com>
1658
1659         [BlackBerry] Adding checks for null when checking cookie status in CookieJarBlackBerry
1660         https://bugs.webkit.org/show_bug.cgi?id=103748
1661
1662         Reviewed by Rob Buis.
1663
1664         Updating CookieJarBlackBerry::cookieEnabled and have other methods in the class call that
1665         method. Also, adding null checks for document->settings().
1666
1667         No change in behaviour.
1668
1669         * loader/blackberry/CookieJarBlackBerry.cpp:
1670         (WebCore::cookies):
1671         (WebCore::setCookies):
1672         (WebCore::cookiesEnabled):
1673         (WebCore::getRawCookies):
1674         (WebCore::deleteCookie):
1675         (WebCore::cookieRequestHeaderFieldValue):
1676
1677 2012-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1678
1679         Unreviewed, rolling out r136236.
1680         http://trac.webkit.org/changeset/136236
1681         https://bugs.webkit.org/show_bug.cgi?id=103833
1682
1683         [chromium] Flakey crashes in SpeechRecognitionEvent::emma
1684         during GC. (Requested by mkwst on #webkit).
1685
1686         * Modules/speech/SpeechRecognition.cpp:
1687         (WebCore::SpeechRecognition::start):
1688         * Modules/speech/SpeechRecognition.h:
1689         (SpeechRecognition):
1690         * Modules/speech/SpeechRecognitionEvent.cpp:
1691         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
1692         * Modules/speech/SpeechRecognitionEvent.h:
1693         (SpeechRecognitionEventInit):
1694         (SpeechRecognitionEvent):
1695         (WebCore::SpeechRecognitionEvent::resultIndex):
1696         * Modules/speech/SpeechRecognitionEvent.idl:
1697         * Modules/speech/SpeechRecognitionResult.cpp:
1698         (WebCore::emmaQualifiedName):
1699         (WebCore):
1700         (WebCore::SpeechRecognitionResult::emma):
1701         * Modules/speech/SpeechRecognitionResult.h:
1702         (WebCore):
1703         (WebCore::SpeechRecognitionResult::final):
1704         (SpeechRecognitionResult):
1705         * Modules/speech/SpeechRecognitionResult.idl:
1706         * WebCore.gypi:
1707         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8SpeechRecognitionEventCustom.cpp.
1708         (WebCore):
1709         (WebCore::V8SpeechRecognitionResult::opaqueRootForGC):
1710
1711 2012-12-01  Sheriff Bot  <webkit.review.bot@gmail.com>
1712
1713         Unreviewed, rolling out r136015.
1714         http://trac.webkit.org/changeset/136015
1715         https://bugs.webkit.org/show_bug.cgi?id=103821
1716
1717         Did not heal performance bot and caused other performance
1718         regressions (Requested by abarth on #webkit).
1719
1720         * bindings/scripts/CodeGeneratorV8.pm:
1721         (GenerateHeader):
1722
1723 2012-12-01  Xiaobo Wang  <xiaobo.wang@torchmobile.com.cn>
1724
1725         DRT - crashed in WebCore::SearchFieldCancelButtonElement::defaultEventHandler
1726         https://bugs.webkit.org/show_bug.cgi?id=103592
1727
1728         Reviewed by Kent Tamura.
1729
1730         The crash happened when the search field cancel button handles mouseout
1731         event after the search input was detached. When it happens the input
1732         element returned from shadowHost() is null, need to check the pointer
1733         before dereferencing.
1734         InputFieldSpeechButton and SearchFieldResultsButtonElement have the
1735         similar issue.
1736
1737         No new tests. The patch fixes the following test on BlackBerry platform.
1738         Test: fast/forms/search-delete-while-cancel-button-clicked.html
1739
1740         * html/shadow/TextControlInnerElements.cpp:
1741         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
1742         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
1743         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
1744         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
1745         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
1746         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
1747
1748 2012-11-30  Mike West  <mkwst@chromium.org>
1749
1750         CSP 1.1: Make the CSP_NEXT flag runtime enabled.
1751         https://bugs.webkit.org/show_bug.cgi?id=103652
1752
1753         Reviewed by Adam Barth.
1754
1755         Content Security Policy 1.1 continues to live behind the CSP_NEXT flag,
1756         this patch adds another layer on top of that in order to enable runtime
1757         decisions about whether it should be active.
1758
1759         * bindings/generic/RuntimeEnabledFeatures.cpp:
1760         (WebCore):
1761         * bindings/generic/RuntimeEnabledFeatures.h:
1762         (RuntimeEnabledFeatures):
1763         (WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled):
1764         (WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled):
1765             Adds methods in order to correctly handle enabling and disabling
1766             CSP 1.1 features.
1767         * dom/Document.idl:
1768             Gate the 'document.securityPolicy' object on the runtime flag.
1769         * page/ContentSecurityPolicy.cpp:
1770         (WebCore::CSPDirectiveList::addDirective):
1771             Check that experimental features are runtime enabled before
1772             processing 1.1 directives.
1773         (WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled):
1774         (WebCore):
1775         * page/ContentSecurityPolicy.h:
1776             Adds a new method which checks against the runtime flag to determine
1777             whether CSP 1.1 features are enabled.
1778
1779 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
1780
1781         Avoid calling into NSUserDefaults every time we start a scroll
1782         https://bugs.webkit.org/show_bug.cgi?id=103804
1783
1784         Reviewed by Dan Bernstein.
1785
1786         Cache the NSScrollAnimationEnabled preference to avoid
1787         hitting NSUserDefaults every time we start scrolling.
1788
1789         * platform/mac/ScrollAnimatorMac.mm:
1790         (WebCore::scrollAnimationEnabledForSystem):
1791
1792 2012-11-30  Beth Dakin  <bdakin@apple.com>
1793
1794         https://bugs.webkit.org/show_bug.cgi?id=103790
1795         The LayerPool m_pruneTimer should have a longer delay
1796
1797         Reviewed by Simon Fraser.
1798
1799         A 1 second delay is more appropriate here.
1800         * platform/graphics/ca/mac/LayerPool.mm:
1801         (WebCore::LayerPool::schedulePrune):
1802
1803 2012-11-30  Jer Noble  <jer.noble@apple.com>
1804
1805         Unreviewed Windows build fix.
1806
1807         Add a default: entry to an case statement to fix a build error when compiled in VS2005.
1808
1809         * html/MediaController.cpp:
1810         (MediaController::playbackState):
1811
1812 2012-11-30  Jer Noble  <jer.noble@apple.com>
1813
1814         Add support for the 'unpause()' method on MediaController.
1815         https://bugs.webkit.org/show_bug.cgi?id=103751
1816
1817         Reviewed by Eric Carlson.
1818
1819         The MediaController spec has been updated to add an unpause() method
1820         which is functionally identical to the old play() method, and changes
1821         the semantics of play() to call play() on the underlying slaved media
1822         elements. The spec also added a playbackState() method, returning a
1823         string representing the last calculated playback state.
1824
1825         Test: media/media-controller-unpause.html
1826
1827         * html/MediaController.cpp:
1828         (MediaController::unpause): Renamed from play().
1829         (MediaController::play): Added. Same as unpause(), but also call
1830             play() on slaved media elements.
1831         (playbackStateWaiting): Static string accessor.
1832         (playbackStatePlaying): Ditto.
1833         (playbackStateEnded): Ditto.
1834         (MediaController::playbackState): Added. Returns string value of
1835             m_playbackState.
1836         * html/MediaController.h:
1837         * html/MediaController.idl:
1838
1839 2012-11-30  Julien Chaffraix  <jchaffraix@webkit.org>
1840
1841         [CSS Grid Layout] Align the grid track code with the specification's production rules
1842         https://bugs.webkit.org/show_bug.cgi?id=103703
1843
1844         Reviewed by Alexis Menard.
1845
1846         In order to support more of the syntax and make the code more readable, this change
1847         splits following the grammar's production rules (see
1848         http://dev.w3.org/csswg/css3-grid-layout/#grid-definition-columns-and-grid-definit).
1849
1850         Refactoring covered by existing tests.
1851
1852         * css/CSSComputedStyleDeclaration.cpp:
1853         (WebCore::valueForGridTrackMinMax):
1854         (WebCore::valueForGridTrackGroup):
1855         (WebCore::valueForGridTrackList):
1856         * css/CSSParser.cpp:
1857         (WebCore::CSSParser::parseGridTrackList):
1858         (WebCore::CSSParser::parseGridTrackGroup):
1859         (WebCore::CSSParser::parseGridTrackMinMax):
1860         * css/CSSParser.h:
1861         * css/StyleResolver.cpp:
1862         (WebCore::createGridTrackMinMax):
1863         (WebCore::createGridTrackGroup):
1864         (WebCore::createGridTrackList):
1865         Mechanical split of the parsing, resolving and computed style code into
1866         <track-list>, <track-group>, <track-minmax> and <track-breadth> parts.
1867
1868         * css/CSSParser.cpp:
1869         (WebCore::CSSParser::parseGridBreadth):
1870         Changed this function to just parse a single value (without any extra logic).
1871
1872         * css/StyleResolver.cpp:
1873         (WebCore::createGridTrackBreadth):
1874         Changed this function to take a Length as it is used to parse a <track-breadth>.
1875         The goal is for it to be the low-level function createGridTrackMinmax will call on
1876         each function parameter.
1877
1878 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
1879
1880         Fix potential crash when canceling animations on renderers with no node
1881         https://bugs.webkit.org/show_bug.cgi?id=103784
1882
1883         Reviewed by Dan Bernstein.
1884
1885         We could crash when tearing down RenderScrollbars because we hit
1886         AnimationController::cancelAnimations() for a renderer with no node.
1887         The assertion already check for a null node, but the line after
1888         does not, so fix that.
1889
1890         I tried to make a test with animations/transitions on a custom scrollbar, but was not able
1891         to get it to crash.
1892
1893         * page/animation/AnimationController.cpp:
1894         (WebCore::AnimationController::cancelAnimations):
1895
1896 2012-11-30  Tim Horton  <timothy_horton@apple.com>
1897
1898         PluginDocument fires didFinishDocumentLoadForFrame upon receiving initial bytes instead of when load completes
1899         https://bugs.webkit.org/show_bug.cgi?id=103702
1900         <rdar://problem/12762534>
1901
1902         Reviewed by Alexey Proskuryakov.
1903
1904         Remove the call to finish() from PluginDocumentParser::appendBytes().
1905
1906         This was introduced in http://trac.webkit.org/changeset/14838, when finish() wouldn't get
1907         called for PluginDocuments any other way. In the time since, DocumentWriter::end() was made
1908         to call finish() anyway, at the correct time (the call from appendBytes makes a PluginDocument
1909         appear to be finished loading after the first bytes are received).
1910
1911         No new tests, because there doesn't seem to be any state in a PluginDocument that can be accessed
1912         from JavaScript to determine whether or not it has finished loading.
1913
1914         * html/PluginDocument.cpp:
1915         (WebCore::PluginDocumentParser::appendBytes):
1916
1917 2012-11-29  Ilya Tikhonovsky  <loislo@chromium.org>
1918
1919         RenderBlock minor clean-up: replace raw pointers with OwnPtrs.
1920         https://bugs.webkit.org/show_bug.cgi?id=103690
1921
1922         Reviewed by Eric Seidel.
1923
1924         raw pointers were replaced with OwnPtrs.
1925         Probably we also gain a small performance improvements because
1926         I replaced get && remove pair with take.
1927
1928         * rendering/RenderBlock.cpp:
1929         (WebCore):
1930         (WebCore::removeBlockFromDescendantAndContainerMaps):
1931         (WebCore::RenderBlock::~RenderBlock):
1932         (WebCore::RenderBlock::addOverflowFromFloats):
1933         (WebCore::RenderBlock::addContinuationWithOutline):
1934         (WebCore::RenderBlock::paintContinuationOutlines):
1935         (WebCore::RenderBlock::insertIntoTrackedRendererMaps):
1936         (WebCore::RenderBlock::removeFromTrackedRendererMaps):
1937         (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
1938         * rendering/RenderBlock.h:
1939         (WebCore):
1940
1941 2012-11-30  Jun Jiang  <jun.a.jiang@intel.com>
1942
1943         WebGL: Add a class to abstract the status of the Image in texImage2D() and texSubImage2D()
1944         https://bugs.webkit.org/show_bug.cgi?id=103606
1945
1946         Reviewed by Kenneth Russell.
1947
1948         In texImage2D() and texSubImage2D() for WebGL, the status of the Image is extracted and kept in the function GraphicsContext3D::getImageData() but provides no interface or guaranteed way to use the status of the Image outside GraphicsContext3D::getImageData() safely. For example, you can not get the address of the raw Image data and operate it outside the scope of the GraphicsContext3D::getImageData() and there is at least one memory copy existed from the Image to the intermediate vector.
1949        This patch refactors the code by adding a ImageExtractor class to abstract and keep the status of the Image. The lifetime and validity of Image status are determined by the lifetime of the object instead of the scope of getImageData(). It provides flexibility on future optimizations.
1950
1951         No new tests. It is a code refactoring patch.
1952
1953         * html/canvas/WebGLRenderingContext.cpp:
1954         (WebCore):
1955         (WebCore::WebGLRenderingContext::texImage2DImpl):
1956         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
1957         * platform/graphics/GraphicsContext3D.cpp:
1958         (WebCore::GraphicsContext3D::ImageExtractor::ImageExtractor):
1959         (WebCore):
1960         (WebCore::GraphicsContext3D::packImageData):
1961         * platform/graphics/GraphicsContext3D.h:
1962         (WebCore):
1963         (GraphicsContext3D):
1964         (ImageExtractor):
1965         (WebCore::GraphicsContext3D::ImageExtractor::extractSucceeded):
1966         (WebCore::GraphicsContext3D::ImageExtractor::imagePixelData):
1967         (WebCore::GraphicsContext3D::ImageExtractor::imageWidth):
1968         (WebCore::GraphicsContext3D::ImageExtractor::imageHeight):
1969         (WebCore::GraphicsContext3D::ImageExtractor::imageSourceFormat):
1970         (WebCore::GraphicsContext3D::ImageExtractor::imageAlphaOp):
1971         (WebCore::GraphicsContext3D::ImageExtractor::imageSourceUnpackAlignment):
1972         * platform/graphics/NativeImagePtr.h:
1973         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1974         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
1975         (WebCore):
1976         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1977         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1978         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
1979         (WebCore):
1980         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1981         * platform/graphics/clutter/GraphicsContext3DClutter.cpp:
1982         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
1983         (WebCore):
1984         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1985         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1986         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
1987         (WebCore):
1988         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1989         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1990         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
1991         (WebCore):
1992         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1993         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
1994         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
1995         (WebCore):
1996         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1997
1998 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
1999
2000         Make RenderLayer::updateLayerPosition() private
2001         https://bugs.webkit.org/show_bug.cgi?id=102624
2002
2003         Reviewed by Ryosuke Niwa.
2004
2005         Made updateLayerPosition() private. The only external caller was
2006         MouseRelatedEvent::computeRelativePosition(), which has no business updating
2007         layer positions. In fact it had positively dangerous behavior; doing just
2008         a style update without layout, and then calling absoluteToLocal() and walking
2009         layers. Fixed by having it call updateLayoutIgnorePendingStylesheets().
2010         
2011         This revealed a bug where event.offsetX/offsetY could be wrong in some cases.
2012         fast/events/stopPropagation-submit.html does a simulated click (which has
2013         client coordinates at 0,0), so the image submit coordinates were incorrectly
2014         0,0. Now that we do layout before computing them, they are correctly reported
2015         as being relative to the element.
2016
2017         * dom/MouseRelatedEvent.cpp:
2018         (WebCore::MouseRelatedEvent::computeRelativePosition):
2019         * rendering/RenderLayer.cpp:
2020         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
2021         * rendering/RenderLayer.h:
2022         (RenderLayer):
2023
2024 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
2025
2026         Late-loading stylesheets can cause composited layers to be blank
2027         https://bugs.webkit.org/show_bug.cgi?id=103773
2028
2029         Reviewed by Tim Horton.
2030
2031         Early painting can be short-circuited in RenderBlock::paintContents() if we know a stylesheet
2032         is pending, which is done to avoid a flash of unstyled content (FOUC). When the stylesheet
2033         finally loaded, Document::styleResolverChanged() would try to repaint everything by calling
2034         repaint() on the RenderView(). In a composited world, however, this repaint() doesn't repaint
2035         composited layers.
2036         
2037         This was particularly prevalent on this specific URL because it failed to load
2038         a CSS file from typekit.com, so Document::styleResolverChanged()
2039         just did the repaint and returned (rather than doing a recalc style as would
2040         happen for correctly loaded stylesheets).
2041         
2042         Fix by making a way to repaint all compositing layers, and calling it
2043         from Document::styleResolverChanged().
2044
2045         No tests because this is timing-dependant.
2046
2047         * dom/Document.cpp:
2048         (WebCore::Document::styleResolverChanged): Call repaintViewAndCompositedLayers().
2049         * rendering/RenderBlock.cpp:
2050         (WebCore::RenderBlock::paintContents): Fix the comment.
2051         * rendering/RenderLayerCompositor.cpp: Convert repaintCompositedLayersAbsoluteRect()
2052         and associated recursiveRepaintLayerRect() to allow the rect to be null, which indicates
2053         that we should just repaint the entire layer, and improve their names.
2054         (WebCore::RenderLayerCompositor::repaintCompositedLayers):
2055         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
2056         * rendering/RenderLayerCompositor.h:
2057         * rendering/RenderView.cpp:
2058         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): repaintCompositedLayersAbsoluteRect()
2059         was renamed to repaintCompositedLayers().
2060         (WebCore::RenderView::repaintViewAndCompositedLayers):
2061         * rendering/RenderView.h:
2062         (RenderView): repaintViewRectangle() and repaintRectangleInViewAndCompositedLayers() should not
2063         be virtual. Add repaintViewAndCompositedLayers().
2064
2065 2012-11-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2066
2067         Unreviewed, rolling out r136142.
2068         http://trac.webkit.org/changeset/136142
2069         https://bugs.webkit.org/show_bug.cgi?id=103768
2070
2071         break a bunch of interactive_ui_tests in chromium win
2072         (Requested by zhenyao_home on #webkit).
2073
2074         * css/CSSComputedStyleDeclaration.cpp:
2075         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2076         * css/CSSParser.cpp:
2077         (WebCore::isValidKeywordPropertyAndValue):
2078         (WebCore::isKeywordPropertyID):
2079         (WebCore::CSSParser::parseValue):
2080         * css/CSSPrimitiveValueMappings.h:
2081         * css/CSSProperty.cpp:
2082         (WebCore::CSSProperty::isInheritedProperty):
2083         * css/CSSPropertyNames.in:
2084         * css/CSSValueKeywords.in:
2085         * css/StyleBuilder.cpp:
2086         (WebCore::StyleBuilder::StyleBuilder):
2087         * css/StyleResolver.cpp:
2088         (WebCore::StyleResolver::applyProperty):
2089         * rendering/InlineFlowBox.cpp:
2090         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2091         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
2092         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
2093         * rendering/RenderRubyRun.cpp:
2094         (WebCore::RenderRubyRun::layout):
2095         * rendering/style/RenderStyle.cpp:
2096         (WebCore::RenderStyle::diff):
2097         * rendering/style/RenderStyle.h:
2098         * rendering/style/RenderStyleConstants.h:
2099         * rendering/style/StyleRareInheritedData.cpp:
2100         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2101         (WebCore::StyleRareInheritedData::operator==):
2102         * rendering/style/StyleRareInheritedData.h:
2103         (StyleRareInheritedData):
2104
2105 2012-11-30  Joshua Bell  <jsbell@chromium.org>
2106
2107         IndexedDB: Replace use of ScriptExecutionContext::Task (Part 1)
2108         https://bugs.webkit.org/show_bug.cgi?id=101483
2109
2110         Reviewed by Tony Chang.
2111
2112         The IDB back end (which runs on a single thread) makes use of ScriptExecutionContext's
2113         Task and facilities for cross-task posting with callbacks, and requires decorating various
2114         IDB classes with "ThreadSafe" when they are not. Move towards encapsulating the tasks
2115         in "Operation" classes which are IDB-operation specific.
2116
2117         Part 1 (this patch) retains the use of ScriptExecutionContext::Task but wraps the creation
2118         and the callback function in an Operation class which will be fleshed out in later patches.
2119         As an aside, a little bit of RefPtr churn is eliminated, and IDB_TRACE sprinkled in.
2120
2121         No new tests - just a refactor.
2122
2123         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
2124         (IDBCursorBackendImpl::CursorIterationOperation):
2125         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::create):
2126         (WebCore):
2127         (IDBCursorBackendImpl::CursorAdvanceOperation):
2128         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::create):
2129         (IDBCursorBackendImpl::CursorPrefetchIterationOperation):
2130         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::create):
2131         (WebCore::IDBCursorBackendImpl::continueFunction):
2132         (WebCore::IDBCursorBackendImpl::advance):
2133         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::perform):
2134         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::perform):
2135         (WebCore::IDBCursorBackendImpl::prefetchContinue):
2136         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
2137         * Modules/indexeddb/IDBCursorBackendImpl.h:
2138         (IDBCursorBackendImpl):
2139         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2140         (IDBDatabaseBackendImpl::CreateObjectStoreOperation):
2141         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::create):
2142         (WebCore):
2143         (IDBDatabaseBackendImpl::DeleteObjectStoreOperation):
2144         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::create):
2145         (IDBDatabaseBackendImpl::VersionChangeOperation):
2146         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
2147         (IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation):
2148         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::create):
2149         (IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation):
2150         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::create):
2151         (IDBDatabaseBackendImpl::VersionChangeAbortOperation):
2152         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
2153         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
2154         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
2155         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
2156         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
2157         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
2158         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
2159         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::perform):
2160         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::perform):
2161         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
2162         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2163         (IDBDatabaseBackendImpl):
2164         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
2165         (IDBIndexBackendImpl::OpenIndexCursorOperation):
2166         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::create):
2167         (WebCore):
2168         (IDBIndexBackendImpl::IndexCountOperation):
2169         (WebCore::IDBIndexBackendImpl::IndexCountOperation::create):
2170         (IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation):
2171         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::create):
2172         (IDBIndexBackendImpl::IndexValueRetrievalOperation):
2173         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::create):
2174         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::perform):
2175         (WebCore::IDBIndexBackendImpl::openCursor):
2176         (WebCore::IDBIndexBackendImpl::openKeyCursor):
2177         (WebCore::IDBIndexBackendImpl::IndexCountOperation::perform):
2178         (WebCore::IDBIndexBackendImpl::count):
2179         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
2180         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::perform):
2181         (WebCore::IDBIndexBackendImpl::get):
2182         (WebCore::IDBIndexBackendImpl::getKey):
2183         * Modules/indexeddb/IDBIndexBackendImpl.h:
2184         (WebCore::IDBIndexBackendImpl::metadata):
2185         (IDBIndexBackendImpl):
2186         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2187         (IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation):
2188         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::create):
2189         (WebCore):
2190         (IDBObjectStoreBackendImpl::ObjectStoreStorageOperation):
2191         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::create):
2192         (IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation):
2193         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::create):
2194         (IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation):
2195         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::create):
2196         (IDBObjectStoreBackendImpl::ObjectStoreClearOperation):
2197         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::create):
2198         (IDBObjectStoreBackendImpl::CreateIndexOperation):
2199         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::create):
2200         (IDBObjectStoreBackendImpl::DeleteIndexOperation):
2201         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::create):
2202         (IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation):
2203         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::create):
2204         (IDBObjectStoreBackendImpl::ObjectStoreCountOperation):
2205         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::create):
2206         (IDBObjectStoreBackendImpl::CreateIndexAbortOperation):
2207         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::create):
2208         (IDBObjectStoreBackendImpl::DeleteIndexAbortOperation):
2209         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::create):
2210         (WebCore::IDBObjectStoreBackendImpl::get):
2211         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
2212         (WebCore::IDBObjectStoreBackendImpl::put):
2213         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
2214         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::perform):
2215         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
2216         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
2217         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::perform):
2218         (WebCore::IDBObjectStoreBackendImpl::clear):
2219         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::perform):
2220         (WebCore::IDBObjectStoreBackendImpl::createIndex):
2221         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
2222         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
2223         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::perform):
2224         (WebCore::IDBObjectStoreBackendImpl::openCursor):
2225         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::perform):
2226         (WebCore::IDBObjectStoreBackendImpl::count):
2227         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::perform):
2228         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::perform):
2229         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::perform):
2230         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
2231         (IDBObjectStoreBackendImpl):
2232
2233 2012-11-30  Tim Horton  <timothy_horton@apple.com>
2234
2235         (Simple)PDFPlugin: Support conversion of PostScript documents
2236         https://bugs.webkit.org/show_bug.cgi?id=103289
2237         <rdar://problem/10235708>
2238
2239         Reviewed by Dan Bernstein.
2240
2241         SimplePDFPlugin (and PDFPlugin) should support converting PostScript files
2242         to PDF before handing them off to their respective backends.
2243
2244         * English.lproj/Localizable.strings:
2245         * WebCore.exp.in:
2246         * platform/LocalizedStrings.cpp:
2247         (WebCore::postScriptDocumentTypeDescription):
2248         * platform/LocalizedStrings.h:
2249         Add and export postScriptDocumentTypeDescription, for PostScript files.
2250
2251 2012-11-30  Justin Novosad  <junov@google.com>
2252
2253         [Chromium] Animation updates fail when using a canvas as a CSS backround-image style with -webkit-canvas
2254         https://bugs.webkit.org/show_bug.cgi?id=103643
2255
2256         Reviewed by Stephen White.
2257
2258         CanvasRenderingContext2D::didDraw was not propagating the change
2259         notification to observers in the accelerated compositing case.
2260         Problem fixed by adding observer notifications.
2261
2262         New manual test: animated-canvas-as-background.html
2263
2264         * html/HTMLCanvasElement.cpp:
2265         (WebCore::HTMLCanvasElement::didDraw):
2266         The observer notification was factored out into a separate method
2267         so that it can be invoked directly for accelerated compositing.
2268         (WebCore):
2269         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
2270         * html/HTMLCanvasElement.h:
2271         (HTMLCanvasElement):
2272         * html/canvas/CanvasRenderingContext2D.cpp:
2273         (WebCore::CanvasRenderingContext2D::didDraw):
2274         Added observer notification call to trigger repainting of elements that
2275         use this canvas for their style.
2276
2277 2012-11-30  James Simonsen  <simonjam@chromium.org>
2278
2279         Report CSS as initiator instead of elements, except body
2280         https://bugs.webkit.org/show_bug.cgi?id=103546
2281
2282         Reviewed by Tony Gentilcore.
2283
2284         The Resource Timing spec says the initiator should be "css" when the the load comes from a
2285         url() rule in a stylesheet. Separately, WebKit reports <body background> as a CSS load, we
2286         need to override that to match the spec.
2287
2288         Tests: http/tests/w3c/webperf/submission/resource-timing
2289
2290         * css/CSSCursorImageValue.cpp:
2291         (WebCore::CSSCursorImageValue::cachedImage):
2292         * css/CSSImageValue.cpp:
2293         (WebCore::CSSImageValue::cachedImage): By default, the initiator is "css".
2294         * css/CSSImageValue.h:
2295         (CSSImageValue):
2296         (WebCore::CSSImageValue::setInitiator): Allow users to manually override it (see body).
2297         * css/StyleResolver.cpp:
2298         (WebCore::StyleResolver::loadPendingImage):
2299         * html/HTMLBodyElement.cpp:
2300         (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute): Record "body" as the initiator.
2301
2302 2012-11-30  James Simonsen  <simonjam@chromium.org>
2303
2304         Remember the CachedResourceRequest for preloads
2305         https://bugs.webkit.org/show_bug.cgi?id=102995
2306
2307         Reviewed by Tony Gentilcore.
2308
2309         Without this, the initiator is lost.
2310
2311         Tests: http/tests/w3c/webperf/submission/resource-timing
2312
2313         * loader/cache/CachedResourceLoader.cpp:
2314         (WebCore::CachedResourceLoader::requestResource):
2315         (WebCore::CachedResourceLoader::loadResource):
2316         (WebCore::CachedResourceLoader::preload):
2317         (WebCore::CachedResourceLoader::checkForPendingPreloads):
2318         (WebCore::CachedResourceLoader::requestPreload):
2319         (WebCore::CachedResourceLoader::isPreloaded):
2320         * loader/cache/CachedResourceLoader.h:
2321         (CachedResourceLoader):
2322         (PendingPreload):
2323
2324 2012-11-30  Michelangelo De Simone  <michelangelo@webkit.org>
2325
2326         [CSS Shaders] Clamp input colors before blending
2327         https://bugs.webkit.org/show_bug.cgi?id=98962
2328
2329         Reviewed by Dean Jackson.
2330
2331         The result of css_ColorMatrix multiplication is now clamped in [0.0, 1.0]
2332         before the blending step.
2333
2334         Relevant spec section is:
2335         http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#shader-processing-model
2336
2337         Tests: css3/filters/custom/custom-filter-color-clamping-negative.html
2338                css3/filters/custom/custom-filter-color-clamping.html
2339
2340         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
2341         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader): Added clamping
2342         code.
2343
2344 2012-11-30  Abhishek Arya  <inferno@chromium.org>
2345
2346         Crash due to intruding float not removed after writing mode changed.
2347         https://bugs.webkit.org/show_bug.cgi?id=100149
2348
2349         Reviewed by Levi Weintraub.
2350
2351         When RenderView writing mode changes, make sure to mark all descendants
2352         with floats for layout.
2353
2354         Test: fast/block/float/intruding-float-not-removed-writing-mode.xhtml
2355
2356         * rendering/RenderBox.cpp:
2357         (WebCore::RenderBox::styleDidChange):
2358
2359 2012-11-30  Florin Malita  <fmalita@chromium.org>
2360
2361         SVG pattern data deleted while in use
2362         https://bugs.webkit.org/show_bug.cgi?id=103415
2363
2364         Reviewed by Dirk Schulze.
2365
2366         Various calls in RenderSVGResourcePattern::applyResource() can trigger invalidations,
2367         which may end up deleting our current pattern data (via removeAllClientsFromCache).
2368         To avoid this, we should add the pattern data to the cache only after it is fully built.
2369         For clarity, the patch also refactors the pattern setup code into a separate method.
2370
2371         Test: svg/custom/large-image-pattern-crash.html
2372
2373         * rendering/svg/RenderSVGResourcePattern.cpp:
2374         (WebCore::RenderSVGResourcePattern::buildPattern):
2375         (WebCore::RenderSVGResourcePattern::applyResource):
2376         * rendering/svg/RenderSVGResourcePattern.h:
2377         (RenderSVGResourcePattern):
2378
2379 2012-11-30  Alexander Pavlov  <apavlov@chromium.org>
2380
2381         Web Inspector: It's Sass, not SASS
2382         https://bugs.webkit.org/show_bug.cgi?id=103626
2383
2384         Reviewed by Yury Semikhatsky.
2385
2386         Change "SASS" to "Sass" in UI strings.
2387
2388         * English.lproj/localizedStrings.js:
2389         * inspector/front-end/Settings.js:
2390         (WebInspector.ExperimentsSettings):
2391         * inspector/front-end/SettingsScreen.js:
2392
2393 2012-11-29  Tommy Widenflycht  <tommyw@google.com>
2394
2395         Speech Recognition API: Update SpeechRecognitionEvent/Result to match the specification
2396         https://bugs.webkit.org/show_bug.cgi?id=103407
2397
2398         Reviewed by Adam Barth.
2399
2400         This patch does the following:
2401         o Adds results, and removing result on SpeechRecognitionEvent
2402         o Renaming SpeechRecognitionResult::final to isFinal
2403         o Moving emma to SpeechRecognitionEvent from SpeechRecognitionResult
2404
2405         Existing tests updated to test the new API.
2406
2407         * Modules/speech/SpeechRecognition.cpp:
2408         (WebCore::SpeechRecognition::start):
2409         (WebCore::SpeechRecognition::didReceiveResults):
2410         (WebCore):
2411         * Modules/speech/SpeechRecognition.h:
2412         (SpeechRecognition):
2413         * Modules/speech/SpeechRecognitionEvent.cpp:
2414         (WebCore::SpeechRecognitionEvent::createResult):
2415         (WebCore):
2416         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
2417         (WebCore::SpeechRecognitionEvent::~SpeechRecognitionEvent):
2418         (WebCore::emmaQualifiedName):
2419         (WebCore::SpeechRecognitionEvent::emma):
2420         * Modules/speech/SpeechRecognitionEvent.h:
2421         (WebCore):
2422         (SpeechRecognitionEventInit):
2423         (SpeechRecognitionEvent):
2424         (WebCore::SpeechRecognitionEvent::resultIndex):
2425         (WebCore::SpeechRecognitionEvent::results):
2426         * Modules/speech/SpeechRecognitionEvent.idl:
2427         * Modules/speech/SpeechRecognitionResult.cpp:
2428         * Modules/speech/SpeechRecognitionResult.h:
2429         (WebCore::SpeechRecognitionResult::isFinal):
2430         (SpeechRecognitionResult):
2431         * Modules/speech/SpeechRecognitionResult.idl:
2432         * WebCore.gypi:
2433         * bindings/v8/custom/V8SpeechRecognitionEventCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp.
2434         (WebCore):
2435         (WebCore::V8SpeechRecognitionEvent::opaqueRootForGC):
2436
2437 2012-11-30  Simon Hausmann  <simon.hausmann@digia.com>, Pierre Rossi  <pierre.rossi@digia.com>
2438
2439         [Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
2440         https://bugs.webkit.org/show_bug.cgi?id=99314
2441
2442         Reviewed by Tor Arne Vestbø.
2443
2444         This big change separates QtWebKit into QtWebKit and QtWebKitWidgets as
2445         shared libraries.
2446
2447         It's a big refactoring that mostly involves moving WebCore dependent
2448         code into QtWebKit and accessing it through exported QWebFrameAdapter
2449         and QWebPageAdapter classes.
2450
2451         * Target.pri:
2452         * platform/qt/QStyleFacade.h: Get rid of styleForPage function, not needed
2453         anymore.
2454         * platform/qt/QWebPageClient.h:
2455         (QWebPageClient): Remove a whole lot of cruft in favour of a simple GL enabling
2456         callback to select the GL texture mapper.
2457         (QWebPageClient::makeOpenGLContextCurrentIfAvailable):
2458
2459 2012-11-30  Simon Hausmann  <simon.hausmann@digia.com>
2460
2461         Unreviewed, rolling out r136227.
2462         http://trac.webkit.org/changeset/136227
2463
2464         Broke the Qt bots due to version mismatch
2465
2466         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
2467         (FullScreenVideoWindow::FullScreenVideoWindow):
2468         (PlatformVideoWindow::PlatformVideoWindow):
2469
2470 2012-11-30  Samuel Rødal  <samuel.rodal@digia.com>
2471
2472         [Qt] Fixed use of to-be-removed compatibility functions in QWindow.
2473
2474         Reviewed by Simon Hausmann.
2475
2476         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
2477         (FullScreenVideoWindow::FullScreenVideoWindow):
2478         (PlatformVideoWindow::PlatformVideoWindow):
2479
2480 2012-11-30  Arpita Bahuguna  <arpitabahuguna@gmail.com>
2481
2482         Caret is painted horizontally in vertical writing mode when there are no visible text
2483         https://bugs.webkit.org/show_bug.cgi?id=102359
2484
2485         Reviewed by Ryosuke Niwa.
2486
2487         In the vertical writing mode the caret rect on an empty editable box or
2488         an empty line is rendered as per the horizontal writing mode.
2489
2490         This changes though when any text is added; the caret is then displayed
2491         in accordance with the vertical writing mode.
2492
2493         Test: editing/selection/caret-alignment-for-vertical-text.html
2494
2495         * rendering/RenderBox.cpp:
2496         (WebCore::RenderBox::localCaretRect):
2497         * rendering/RenderBoxModelObject.cpp:
2498         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
2499         The caret rect should be transposed for the vertical writing mode. Its
2500         width and height values need to be interchanged for it to be oriented
2501         as per the vertical text.
2502
2503 2012-11-30  Sankeerth V S  <sankeerth.vs@samsung.com>
2504
2505         Web Inspector: [Timeline] JS error when clicking in Memory Statistics view
2506         https://bugs.webkit.org/show_bug.cgi?id=103486
2507
2508         Reviewed by Alexander Pavlov.
2509
2510         The counter value can be null/undefined. Hence a check is needed
2511         before we access the "time" property on this counter object.
2512
2513         No new tests required as UI related change.
2514
2515         * inspector/front-end/MemoryStatistics.js:
2516         (WebInspector.MemoryStatistics.prototype._onClick):
2517
2518 2012-11-30  Kent Tamura  <tkent@chromium.org>
2519
2520         Fix typos in DateTimeNumericFieldElement.cpp and DateTimeSymbolicFieldElement.cpp
2521         https://bugs.webkit.org/show_bug.cgi?id=103717
2522
2523         Reviewed by Hajime Morita.
2524
2525         * html/shadow/DateTimeNumericFieldElement.cpp:
2526         (WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
2527         maximum, not maxium.
2528         * html/shadow/DateTimeSymbolicFieldElement.cpp:
2529         (WebCore::DateTimeSymbolicFieldElement::customStyleForRenderer): Ditto.
2530
2531 2012-11-30  Halton Huo  <halton.huo@intel.com>
2532
2533         [EFL] libwebcore_efl.a fail to link when enable webgl
2534         https://bugs.webkit.org/show_bug.cgi?id=103610
2535
2536         Reviewed by Gyuyoung Kim.
2537
2538         libwebcore_efl.a should link to X11, Xcomposite and Xrender libraries when ENABLE_WEBGL is ON
2539
2540         No new tests, no behavior change for layout tests.
2541
2542         * PlatformEfl.cmake: Append ${X11_X11_LIB}, ${X11_Xcomposite_LIB} and ${X11_Xrender_LIB} to WebCore_LIBRARIES
2543
2544 2012-11-30  Tim Horton  <timothy_horton@apple.com>
2545
2546         Unreviewed, fix the PDFPlugin build after http://trac.webkit.org/changeset/136205.
2547
2548         * WebCore.xcodeproj/project.pbxproj:
2549
2550 2012-11-30  Mihai Maerean  <mmaerean@adobe.com>
2551
2552         [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
2553         https://bugs.webkit.org/show_bug.cgi?id=101192
2554
2555         Reviewed by Hajime Morita.
2556
2557         Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
2558
2559         Tests: No new tests because there is no functional change.
2560
2561         * WebCore.exp.in:
2562         * WebCore.vcproj/copyForwardingHeaders.cmd:
2563         * WebCore.xcodeproj/project.pbxproj:
2564         * bindings/generic/RuntimeEnabledFeatures.cpp:
2565         (WebCore):
2566         * bindings/generic/RuntimeEnabledFeatures.h:
2567         (RuntimeEnabledFeatures):
2568         (WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
2569         (WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):
2570         * dom/Document.cpp:
2571         (WebCore::Document::cssRegionsEnabled):
2572         * page/Settings.cpp:
2573         (WebCore::Settings::Settings):
2574         * page/Settings.h:
2575         (Settings):
2576
2577 2012-11-29  Martin Robinson  <mrobinson@igalia.com>
2578
2579         [GTK] [WebKit2] WebKitWebViewBase creates a GL context for the redirected XComposite window crashing WebKit in Xvfb
2580         https://bugs.webkit.org/show_bug.cgi?id=103476
2581
2582         Reviewed by Alejandro G. Castro.
2583
2584         Allow creation of RedirectedXCompositeWindow in a mode which does not have a backing
2585         GLContext. For WebKit2 the GLContext is always in the WebProcess. Creating the GLContext
2586         in both processes can cause crashes when library is run in Xvfb.
2587
2588         No new tests. This fixes a crash running tests on some systems.
2589
2590         * platform/gtk/RedirectedXCompositeWindow.cpp:
2591         (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
2592         (WebCore::RedirectedXCompositeWindow::resize): Do not create the GLContext when
2593         in the new no-GLContext mode.
2594         (WebCore::RedirectedXCompositeWindow::context): ASSERT that we are not in
2595         no-GLContext mode.
2596
2597 2012-11-29  Keishi Hattori  <keishi@webkit.org>
2598
2599         Better type ahead for DateTimeSymbolicFieldElement
2600         https://bugs.webkit.org/show_bug.cgi?id=103031
2601
2602         Reviewed by Kent Tamura.
2603
2604         This cuts out the type ahead code that will be used by HTMLSelectElement
2605         and DateTimeSymbolicFieldElement into a TypeAhead class. This will
2606         improve DateTimeSymbolicFieldElement type ahead which was first
2607         character match only, by adding cycling, prefix match and index number
2608         match.
2609
2610         Added tests to month-multiple-fields-keyboard-events.html.
2611
2612         * GNUmakefile.list.am: Added TypeAhead.{h,cpp}
2613         * Target.pri: Ditto.
2614         * WebCore.gypi: Ditto.
2615         * WebCore.vcproj/WebCore.vcproj: Ditto.
2616         * WebCore.xcodeproj/project.pbxproj: Ditto.
2617         * CMakeLists.txt: Ditto.
2618         * html/HTMLSelectElement.cpp:
2619         (WebCore):
2620         (WebCore::HTMLSelectElement::HTMLSelectElement):
2621         (WebCore::HTMLSelectElement::indexOfSelectedOption): Returns index of current selection.
2622         (WebCore::HTMLSelectElement::optionCount): Returns total number of options.
2623         (WebCore::HTMLSelectElement::optionAtIndex): Returns option at index.
2624         (WebCore::HTMLSelectElement::typeAheadFind): Use TypeAhead.
2625         * html/HTMLSelectElement.h:
2626         (HTMLSelectElement):
2627         * html/TypeAhead.cpp: Added.
2628         (WebCore):
2629         (WebCore::TypeAhead::TypeAhead):
2630         (WebCore::stripLeadingWhiteSpace): Moved from HTMLSelectElement.cpp.
2631         (WebCore::TypeAhead::handleEvent): Returns index for match.
2632         * html/TypeAhead.h: Added.
2633         (WebCore):
2634         (TypeAheadDataSource): Provide the data about the options that TypeAhead should match against.
2635         (TypeAhead):
2636         * html/shadow/DateTimeSymbolicFieldElement.cpp:
2637         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
2638         (WebCore::DateTimeSymbolicFieldElement::handleKeyboardEvent):
2639         (WebCore::DateTimeSymbolicFieldElement::indexOfSelectedOption):
2640         (WebCore):
2641         (WebCore::DateTimeSymbolicFieldElement::optionCount):
2642         (WebCore::DateTimeSymbolicFieldElement::optionAtIndex):
2643         * html/shadow/DateTimeSymbolicFieldElement.h:
2644         (DateTimeSymbolicFieldElement):
2645
2646 2012-11-29  Rafael Weinstein  <rafaelw@chromium.org>
2647
2648         [HTMLTemplateElement] Add feature flag
2649         https://bugs.webkit.org/show_bug.cgi?id=103694
2650
2651         Reviewed by Adam Barth.
2652
2653         This flag will guard the implementation of the HTMLTemplateElement.
2654         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
2655
2656         * Configurations/FeatureDefines.xcconfig:
2657         * GNUmakefile.features.am:
2658
2659 2012-11-29  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
2660
2661         Fix typo in commit 136189
2662         https://bugs.webkit.org/show_bug.cgi?id=103706
2663
2664         Reviewed by Kentaro Hara.
2665
2666         Because of typo in commit 136189 blue color value was set twice for every pixel.
2667
2668         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2669         (WebCore::setPixel):
2670
2671 2012-11-29  Elliott Sprehn  <esprehn@chromium.org>
2672
2673         Node::isDescendantOf contains logic that duplicates isDocumentNode
2674         https://bugs.webkit.org/show_bug.cgi?id=103698
2675
2676         Reviewed by Hajime Morita.
2677
2678         Instead of checking for documents with node->document() == node just
2679         use node->isDocumentNode().
2680
2681         * dom/Node.cpp:
2682         (WebCore::Node::isDescendantOf):
2683
2684 2012-11-29  Alexey Proskuryakov  <ap@apple.com>
2685
2686         [WK2] Forward cookie jar calls to NetworkProcess
2687         https://bugs.webkit.org/show_bug.cgi?id=103457
2688
2689         Reviewed by Darin Adler.
2690
2691         * WebCore.exp.in:
2692         * WebCore.xcodeproj/project.pbxproj:
2693         PlatformCookieJar.h functions are now used in WebKit2.
2694
2695         * loader/CookieJar.cpp:
2696         (WebCore::cookies):
2697         (WebCore::setCookies):
2698         (WebCore::cookiesEnabled):
2699         (WebCore::cookieRequestHeaderFieldValue):
2700         (WebCore::getRawCookies):
2701         (WebCore::deleteCookie):
2702         (WebCore::getHostnamesWithCookies):
2703         (WebCore::deleteCookiesForHostname):
2704         (WebCore::deleteAllCookies):
2705         Use a strategy instead of going to PlatformCookieJar directly.
2706
2707         * platform/Cookie.h: (Cookie): Added a default constructor, so that Cookie could be
2708         sent over IPC.
2709
2710         * platform/CookiesStrategy.h: Added functions for cookie jar.
2711
2712 2012-11-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2713
2714         Unreviewed, rolling out r136167.
2715         http://trac.webkit.org/changeset/136167
2716         https://bugs.webkit.org/show_bug.cgi?id=103701
2717
2718         Win debug build failure (Requested by zhenyao on #webkit).
2719
2720         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
2721         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
2722         * platform/graphics/chromium/LazyDecodingPixelRef.h:
2723         (LazyDecodingPixelRef):
2724
2725 2012-11-29  David Grogan  <dgrogan@chromium.org>
2726
2727         IndexedDB: Propagate more leveldb errors to script
2728         https://bugs.webkit.org/show_bug.cgi?id=103580
2729
2730         Reviewed by Tony Chang.
2731
2732         LevelDBDatabase used a single return value to indicate both I/O problems
2733         and a missing key. Now an out variable is used to indicate if the
2734         requested key was found. The return value is used to report corruption
2735         or disk error.
2736
2737         This is a small step toward propagating low level errors everywhere
2738         possible. So far only one scenario will newly cause script to receive
2739         an error: when leveldb has trouble looking for existing keys during an
2740         objectstore->add.
2741
2742         * Modules/indexeddb/IDBBackingStore.cpp:
2743         (WebCore::getInt):
2744         (WebCore::getVarInt):
2745         (WebCore::getString):
2746         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
2747         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
2748         (WebCore::IDBBackingStore::keyExistsInObjectStore):
2749         * Modules/indexeddb/IDBBackingStore.h:
2750         (IDBBackingStore):
2751         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2752         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
2753         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2754         (WebCore::IDBObjectStoreBackendImpl::generateKey):
2755         (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
2756         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
2757         (IDBObjectStoreBackendImpl):
2758         * platform/leveldb/LevelDBDatabase.cpp:
2759         (WebCore::LevelDBDatabase::safeGet):
2760         * platform/leveldb/LevelDBDatabase.h:
2761         (LevelDBDatabase):
2762         * platform/leveldb/LevelDBTransaction.cpp:
2763         (WebCore::LevelDBTransaction::safeGet):
2764         (WebCore):
2765         (WebCore::LevelDBTransaction::get):
2766         * platform/leveldb/LevelDBTransaction.h:
2767         (LevelDBTransaction):
2768
2769 2012-11-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2770
2771         Unreviewed, rolling out r136171.
2772         http://trac.webkit.org/changeset/136171
2773         https://bugs.webkit.org/show_bug.cgi?id=103695
2774
2775         Likely caused ReOpenedWithID and ReOpenedWithURL to fail in
2776         linux/chromeos (Requested by zhenyao on #webkit).
2777
2778         * inspector/InspectorClient.h:
2779         (WebCore::InspectorClient::startMainThreadMonitoring):
2780         (WebCore::InspectorClient::stopMainThreadMonitoring):
2781         * inspector/InspectorController.cpp:
2782         * inspector/InspectorController.h:
2783         (InspectorController):
2784         * inspector/InspectorInstrumentation.cpp:
2785         (WebCore):
2786         (WebCore::InspectorInstrumentation::willProcessTaskImpl):
2787         (WebCore::InspectorInstrumentation::didProcessTaskImpl):
2788         * inspector/InspectorInstrumentation.h:
2789         (InspectorInstrumentation):
2790         (WebCore::InspectorInstrumentation::willProcessTask):
2791         (WebCore):
2792         (WebCore::InspectorInstrumentation::didProcessTask):
2793         * inspector/InspectorTimelineAgent.cpp:
2794         (WebCore::InspectorTimelineAgent::start):
2795         (WebCore::InspectorTimelineAgent::stop):
2796
2797 2012-11-29  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
2798
2799         Optimization in image decoding.
2800         https://bugs.webkit.org/show_bug.cgi?id=88424
2801
2802         Reviewed by Brent Fulgham.
2803
2804         Reduce branching and multiplications in JPEG image decoding loops and functions.
2805         Code is moved to the template functions with scale and color space template parameters
2806         because they were reason of branches inside loops. With templated funtions compiler
2807         will generate separate instance of function for every set of parameters removing
2808         unreachable code in every condition where constant value is used.
2809
2810         Rebase and update of original patch by Misha Tyutyunik <michael.tyuytunik@nokia.com> .
2811
2812         Thanks to Noel Gordon for his help in cleaning up remaining issues.
2813
2814         Covered by existing tests.
2815
2816         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2817         (WebCore):
2818         (WebCore::setPixel):
2819         (WebCore::JPEGImageDecoder::outputScanlines):
2820         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2821         (JPEGImageDecoder):
2822
2823 2012-11-29  Kentaro Hara  <haraken@chromium.org>
2824
2825         Unreviewed, rolling out r135862.
2826         http://trac.webkit.org/changeset/135862
2827         https://bugs.webkit.org/show_bug.cgi?id=103367
2828
2829         We've been observing 'Fatal error in
2830         v8::V8::AddMessageListener()' in bots
2831
2832         * bindings/v8/V8Binding.cpp:
2833         (WebCore::v8NonStringValueToWebCoreString):
2834         * bindings/v8/V8StringResource.cpp:
2835         (WebCore::int32ToWebCoreStringFast):
2836         (WebCore::int32ToWebCoreString):
2837         * bindings/v8/V8StringResource.h:
2838         (WebCore::V8StringResource::V8StringResource):
2839         (WebCore::V8StringResource::prepareBase):
2840         (WebCore::V8StringResource::setString):
2841         (V8StringResource):
2842         (WebCore::V8StringResource::toString):
2843         (WebCore::::prepare):
2844
2845 2012-11-29  Pavel Feldman  <pfeldman@chromium.org>
2846
2847         Web Inspector: optimize repaint regions upon text editing
2848         https://bugs.webkit.org/show_bug.cgi?id=103674
2849
2850         Reviewed by Vsevolod Vlasov.
2851
2852         There is a lot happening that makes repaint area larger than it should be,
2853         namely unnecessary tabbed pane and navigator updates.
2854
2855         * inspector/front-end/NavigatorView.js:
2856         (WebInspector.NavigatorView.prototype._updateScriptTitle):
2857         * inspector/front-end/TabbedPane.js:
2858         (WebInspector.TabbedPaneTab.prototype.set title):
2859
2860 2012-11-29  KyungTae Kim  <ktf.kim@samsung.com>
2861
2862         Unused parameters on plugins/npapi.cpp
2863         https://bugs.webkit.org/show_bug.cgi?id=103676
2864
2865         Reviewed by Kentaro Hara.
2866
2867         Because 'instance' and 'menu' are not used when !PLATFORM(QT) || !defined(XP_MACOSX),
2868         use UNUSED_PARAM macro to fix build warning -Wunused-parameter
2869
2870         * plugins/npapi.cpp:
2871         (NPN_PopUpContextMenu):
2872
2873 2012-11-29  Pablo Flouret  <pablof@motorola.com>
2874
2875         REGRESSION(r134693): Compilation error on @supports grammar code
2876         https://bugs.webkit.org/show_bug.cgi?id=103678
2877
2878         Reviewed by Tony Chang.
2879
2880         Coming from https://bugs.webkit.org/show_bug.cgi?id=102295
2881
2882         No new tests, compile fix.
2883
2884         * css/CSSGrammar.y.in:
2885
2886 2012-11-29  Simon Fraser  <simon.fraser@apple.com>
2887
2888         Avoid painting lots of small rects in WebLayer painting
2889         https://bugs.webkit.org/show_bug.cgi?id=103673
2890
2891         Reviewed by Tim Horton.
2892
2893         r109186 added code in drawLayerContents() to enumerate over the rects in
2894         the CALayer's dirty region, and paint them individually. This was done
2895         to help performance on the IE Maze Solver test.
2896         
2897         On large, complex pages like Facebook, the overhead of traversing the
2898         RenderLayer tree for painting is such that it's better to paint a single,
2899         or fewer rects rather than lots of little ones.
2900         
2901         So adopt a heuristic similar to that in DrawingArea, where if the
2902         combined area of the small rects is 75% or more of the combined rect,
2903         just paint the combined rect. Also paint the combined rect if there
2904         are more than 5 individual rects.
2905         
2906         I verified that this preserves the optimization for IE Maze Solver.
2907
2908         * platform/graphics/mac/WebLayer.mm:
2909         (drawLayerContents):
2910
2911 2012-11-29  Eugene Klyuchnikov  <eustas@chromium.org>
2912
2913         Web Inspector: Web Inspector: Make main-thread monitoring go through InspectorController.
2914         https://bugs.webkit.org/show_bug.cgi?id=103550
2915
2916         Reviewed by Pavel Feldman.
2917
2918         InspectorInstrumentation was a wrong path.
2919
2920         * inspector/InspectorClient.h: Remove start/stop methods.
2921         * inspector/InspectorController.cpp:
2922         Dispatch main thread activity notifications. 
2923         * inspector/InspectorController.h: Ditto.
2924         * inspector/InspectorInstrumentation.cpp: Remove dispatching.
2925         * inspector/InspectorInstrumentation.h: Ditto.
2926         * inspector/InspectorTimelineAgent.cpp:
2927         Do not subscribe for notifications explicitly.
2928
2929 2012-11-29  Adam Barth  <abarth@webkit.org>
2930
2931         [V8] DOM callbacks shouldn't reimplement ScopedPersistent they should use it
2932         https://bugs.webkit.org/show_bug.cgi?id=103662
2933
2934         Reviewed by Eric Seidel.
2935
2936         This patch replaces yet another instance of the ScopedPersistent
2937         pattern with ScopedPersistent.
2938
2939         * bindings/scripts/CodeGeneratorV8.pm:
2940         (GenerateCallbackHeader):
2941         (GenerateCallbackImplementation):
2942         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
2943         (WebCore::V8SQLStatementErrorCallback::handleEvent):
2944         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
2945         (WebCore::V8MutationCallback::handleEvent):
2946
2947 2012-11-29  Min Qin  <qinmin@chromium.org>
2948
2949         Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it
2950         https://bugs.webkit.org/show_bug.cgi?id=103555
2951
2952         Reviewed by Stephen White.
2953
2954         Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef.
2955         No test added for now as impl side paiting is still WIP.
2956
2957         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
2958         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
2959         (WebCore::LazyDecodingPixelRef::PrepareToDecode):
2960         (WebCore):
2961         (WebCore::LazyDecodingPixelRef::Decode):
2962         * platform/graphics/chromium/LazyDecodingPixelRef.h:
2963         (LazyDecodingPixelRef):
2964
2965 2012-11-29  Julien Chaffraix  <jchaffraix@webkit.org>
2966
2967         Unreviewed build fix.
2968
2969         * WebCore.gypi:
2970         The new file is GridTrackSize.h not GridTrackSizes.h. For some reason, the
2971         EWS didn't complain.
2972
2973 2012-11-29  John Knottenbelt  <jknotten@chromium.org>
2974
2975         Use GeolocationController's last geoposition as cached position.
2976         https://bugs.webkit.org/show_bug.cgi?id=103540
2977
2978         Reviewed by Benjamin Poulain.
2979
2980         The page's GeolocationController mediates access to the
2981         GeolocationClient for multiple frames' Geolocation instances. This
2982         patch changes the position cache to be on the GeolocationController
2983         rather than on the Geolocation instance.
2984
2985         This fixes a bug where if one frame has has received a fresh
2986         position, then a request for a cached position from a second frame
2987         does not succeed because the Geolocation instance in the second
2988         frame's position cache hasn't received the position update that
2989         went to the first frame.
2990
2991         Test: fast/dom/Geolocation/cached-position-iframe.html
2992
2993         * Modules/geolocation/Geolocation.cpp:
2994         (WebCore::Geolocation::makeCachedPositionCallbacks):
2995         (WebCore::Geolocation::haveSuitableCachedPosition):
2996         (WebCore::Geolocation::positionChanged):
2997         * Modules/geolocation/Geolocation.h:
2998         * Modules/geolocation/GeolocationController.h:
2999         (GeolocationController):
3000
3001 2012-11-29  Alexei Filippov  <alph@chromium.org>
3002
3003         Web Inspector: Allow sorting in NMI snapshot grid view
3004         https://bugs.webkit.org/show_bug.cgi?id=102955
3005
3006         Reviewed by Yury Semikhatsky.
3007
3008         * English.lproj/localizedStrings.js:
3009         * inspector/front-end/NativeMemorySnapshotView.js:
3010         (WebInspector.NativeSnapshotDataGrid.prototype.sortingChanged):
3011         (WebInspector.NativeSnapshotDataGrid.prototype._sortingFunction):
3012         (WebInspector.NativeSnapshotNode):
3013         (WebInspector.NativeSnapshotNode.prototype._storeState):
3014         (WebInspector.NativeSnapshotNode.prototype._restoreState):
3015         (WebInspector.NativeSnapshotNode.prototype.uid):
3016         (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
3017
3018 2012-11-29  Martin Robinson  <mrobinson@igalia.com>
3019
3020         [GTK] [WebKit2] Embed the HTTP authentication dialog into the WebView
3021         https://bugs.webkit.org/show_bug.cgi?id=103277
3022
3023         Reviewed by Carlos Garcia Campos.
3024
3025         Refactor the WebCore authentication dialog so that it can be reused for the WebKit2
3026         embedded authentication dialog. The main purpose of this refactor is so that the
3027         dialog does not rely on GtkDialog to add the action buttons to the dialog itself.
3028         This also simplifies the structure of the dialog, using the GtkTable or GtkGrid to
3029         contain more of the widget elements, greatly simplifying this code. We also expose
3030         a new constructor that does not create the parent GtkDialog -- so that WebKit2
3031         can embed the dialog directly into the WebView.
3032
3033         No new tests. This shouldn't change behavior, only slightly the look of the authentication
3034         dialog.
3035
3036         * platform/gtk/GtkAuthenticationDialog.cpp:
3037         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Added this new constructor
3038         which does not add the dialog contents to a GtkDialog.
3039         (WebCore::packTwoColumnLayoutInBox): Added this generic method for creating a two column
3040         layout in the style the dialog box needs (for both GTK+ 2.x and GTK+ 3.x).
3041         (WebCore::createDialogLabel): Added this helper.
3042         (WebCore::createDialogEntry): ditto.
3043         (WebCore::GtkAuthenticationDialog::createContentsInContainer): Added this method which
3044         can be used by subclasses to add the guts of the dialog to the parent container.
3045         (WebCore::GtkAuthenticationDialog::show): Added some focus/default handling code that
3046         GtkDialog was calling before.
3047         (WebCore::GtkAuthenticationDialog::buttonClickedCallback): Added a button clicked handler.
3048         Before GtkDialog handled this.
3049         * platform/gtk/GtkAuthenticationDialog.h: Updated methods to reflect new functionality.
3050         (WebCore::GtkAuthenticationDialog::~GtkAuthenticationDialog): Inline the default constructor.
3051
3052 2012-11-29  Beth Dakin  <bdakin@apple.com>
3053
3054         https://bugs.webkit.org/show_bug.cgi?id=103577
3055         TiledDrawingArea should recycle tiles
3056         -and corresponding-
3057         <rdar://problem/12714586>
3058
3059         Reviewed by Simon Fraser.
3060
3061         New class LayerPool will keep a list of layers to reuse so that 
3062         we can avoid creating and destroying so many layer.
3063
3064         When removing layers, add them to the LayerPool
3065         * platform/graphics/ca/mac/TileCache.mm:
3066         (WebCore::TileCache::revalidateTiles):
3067
3068         Before creating a new layer, try to get one of the appropriate size 
3069         from the LayerPool.
3070         (WebCore::TileCache::createTileLayer):
3071
3072         New class.
3073         * WebCore.xcodeproj/project.pbxproj:
3074         * platform/graphics/ca/mac/LayerPool.h: Added.
3075         (WebCore):
3076         (LayerPool):
3077         (WebCore::LayerPool::capacity):
3078         (WebCore::LayerPool::canReuseLayerWithSize):
3079         * platform/graphics/ca/mac/LayerPool.mm: Added.
3080         (WebCore):
3081         (WebCore::LayerPool:: LayerPool):
3082         (WebCore::LayerPool::sharedPool):
3083         (WebCore::LayerPool::bytesBackingLayerWithPixelSize):
3084         (WebCore::LayerPool::listOfLayersWithSize):
3085         (WebCore::LayerPool::addLayer):
3086         (WebCore::LayerPool::takeLayerWithSize):
3087         (WebCore::LayerPool::decayedCapacity):
3088         (WebCore::LayerPool::schedulePrune):
3089         (WebCore::LayerPool::prune):
3090         (WebCore::LayerPool::drain):
3091
3092         If we're under memory pressure, drain the LayerPool
3093         * platform/mac/MemoryPressureHandlerMac.mm:
3094         (WebCore::MemoryPressureHandler::releaseMemory):
3095
3096 2012-11-29  Julien Chaffraix  <jchaffraix@webkit.org>
3097
3098         [CSS Grid Layout] track sizing functions should have their own type
3099         https://bugs.webkit.org/show_bug.cgi?id=103343
3100
3101         Reviewed by Tony Chang.
3102
3103         The current code uses a Length to represent the track sizing function. This is
3104         fine as we only parse <length> | <percentage> but in order to support minmax
3105         sizing, we have to store 2 Lengths. We could go with a pair but that would make
3106         the code not very readable so this change introduces GridTrackSize.
3107
3108         Refactoring, covered by existing tests.
3109
3110         * GNUmakefile.list.am:
3111         * Target.pri:
3112         * WebCore.gypi:
3113         * WebCore.vcproj/WebCore.vcproj:
3114         * WebCore.xcodeproj/project.pbxproj:
3115         Added GridTrackSize.h to all our build systems.
3116
3117         * css/CSSComputedStyleDeclaration.cpp:
3118         (WebCore::valueForGridTrackBreadth):
3119         (WebCore::valueForGridTrackList):
3120         * css/StyleResolver.cpp:
3121         (WebCore::createGridTrackBreadth):
3122         (WebCore::createGridTrackList):
3123         (WebCore::StyleResolver::applyProperty):
3124         * rendering/RenderGrid.cpp:
3125         (WebCore::RenderGrid::computePreferredLogicalWidths):
3126         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
3127         * rendering/style/RenderStyle.h:
3128         Updated the above call sites to use GridTrackSize. While
3129         touching them, changed the code to use an empty Vector to represent
3130         'none' instead of Length(Undefined).
3131
3132         * rendering/style/StyleGridData.h:
3133         Updated #include, removed a comment as it would have gone stale after
3134         adding more grammar support and added a FIXME to rename some variables.
3135
3136         * rendering/RenderGrid.cpp:
3137         (WebCore::RenderGrid::layoutGridItems):
3138         Implemented a work-around to avoid crashing due to implicit columns / rows.
3139
3140         * rendering/style/GridTrackSize.h: Added.
3141         (WebCore::GridTrackSize::GridTrackSize):
3142         (WebCore::GridTrackSize::length):
3143         (WebCore::GridTrackSize::setLength):
3144         (WebCore::GridTrackSize::type):
3145         (WebCore::GridTrackSize::operator==):
3146         New class, it now only wraps a single Length.
3147
3148 2012-11-29  Helder Correia  <helder.correia@nokia.com>
3149
3150         Typo in Color creation function name
3151         https://bugs.webkit.org/show_bug.cgi?id=103464
3152
3153         Reviewed by Alexey Proskuryakov.
3154
3155         Renaming createUnCheked() as createUnchecked().
3156
3157         No new tests.
3158
3159         * platform/graphics/Color.cpp:
3160         (WebCore::colorFromPremultipliedARGB):
3161         * platform/graphics/Color.h:
3162         (WebCore::Color::createUnchecked):
3163
3164 2012-11-29  Otto Derek Cheung  <otcheung@rim.com>
3165
3166         [BlackBerry] Cookies in private mode should not have access to public cookies
3167         https://bugs.webkit.org/show_bug.cgi?id=103649
3168
3169         Reviewed by Rob Buis.
3170
3171         PR 253983
3172
3173         When CookieManager switches back from public to private mode,
3174         we will clear the cookie tree so the browser won't have access
3175         to the public cookies.
3176
3177         Tested using browser.swlab.rim.net cookie tests and the steps in
3178         the PR.
3179
3180         * platform/blackberry/CookieManager.cpp:
3181         (WebCore::CookieManager::setPrivateMode):
3182
3183 2012-11-29  Brent Fulgham  <bfulgham@gmail.com>
3184
3185         Be consistent in handling of frameAtIndex (and related) returns.
3186         https://bugs.webkit.org/show_bug.cgi?id=103207
3187
3188         Reviewed by David Hyatt.
3189
3190         Under various conditions, frameAtIndex (and therefore,
3191         nativeImageForCurrentFrame) returns null. A series of bugs over
3192         the years has ensured null returns are handled in some cases,
3193         but there are a handful of remaining cases where this is still a
3194         problem. 
3195
3196         No new tests, as these low-level functions are covered by
3197         numerous existing test cases.
3198
3199 2012-11-29  David Hyatt  <hyatt@apple.com>
3200
3201         [New Multicolumn] Add minimum column height tracking and forced break tracking to column sets.
3202         https://bugs.webkit.org/show_bug.cgi?id=103657
3203
3204         Reviewed by Simon Fraser.
3205
3206         * rendering/RenderMultiColumnSet.cpp:
3207         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
3208         * rendering/RenderMultiColumnSet.h:
3209         (WebCore::RenderMultiColumnSet::updateMinimumColumnHeight):
3210         (WebCore::RenderMultiColumnSet::minimumColumnHeight):
3211         (RenderMultiColumnSet):
3212         (WebCore::RenderMultiColumnSet::forcedBreaksCount):
3213         (WebCore::RenderMultiColumnSet::forcedBreakOffset):
3214         (WebCore::RenderMultiColumnSet::maximumDistanceBetweenForcedBreaks):
3215         (WebCore::RenderMultiColumnSet::clearForcedBreaks):
3216         (WebCore::RenderMultiColumnSet::addForcedBreak):
3217
3218 2012-11-29  Pavel Feldman  <pfeldman@chromium.org>
3219
3220         Web Inspector: introduce fast case for within-chunk edit
3221         https://bugs.webkit.org/show_bug.cgi?id=103545
3222
3223         Reviewed by Vsevolod Vlasov.
3224
3225         Special-casing edits within the chunk for faster operation.
3226
3227         * inspector/front-end/DOMExtension.js:
3228         (removeSubsequentNodes):
3229         * inspector/front-end/DefaultTextEditor.js:
3230         (WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):
3231
3232 2012-11-29  Pavel Feldman  <pfeldman@chromium.org>
3233
3234         Web Inspector: Console: hovering node wrappers in object tree should highlight them on the page
3235         https://bugs.webkit.org/show_bug.cgi?id=101150
3236
3237         Reviewed by Vsevolod Vlasov.
3238
3239         - Introduced a way to highlight nodes by object id in addition to node id.
3240         - Decorated nodes in the object tree outline and added on-hover highlighting.
3241
3242         * inspector/Inspector.json:
3243         * inspector/InspectorDOMAgent.cpp:
3244         (WebCore::InspectorDOMAgent::highlightNode):
3245         * inspector/InspectorDOMAgent.h:
3246         (InspectorDOMAgent):
3247         * inspector/front-end/ConsoleMessage.js:
3248         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):
3249         * inspector/front-end/DOMAgent.js:
3250         (WebInspector.DOMAgent.prototype.highlightDOMNode):
3251         * inspector/front-end/DOMPresentationUtils.js:
3252         (WebInspector.DOMPresentationUtils.createSpansForNodeTitle):
3253         * inspector/front-end/ObjectPropertiesSection.js:
3254         (WebInspector.ObjectPropertyTreeElement.prototype.update):
3255         (WebInspector.ObjectPropertyTreeElement.prototype._mouseMove):
3256         (WebInspector.ObjectPropertyTreeElement.prototype._mouseOut):
3257         * inspector/front-end/RemoteObject.js:
3258         (WebInspector.RemoteObject.prototype.highlightAsDOMNode):
3259         (WebInspector.RemoteObject.prototype.hideDOMNodeHighlight):
3260         * inspector/front-end/TestController.js:
3261         * inspector/front-end/externs.js:
3262         * inspector/front-end/inspector.css:
3263         (.console-formatted-node:hover):
3264         * inspector/front-end/utilities.js:
3265
3266 2012-11-29  Dan Bernstein  <mitz@apple.com>
3267
3268         <rdar://problem/12771885> Support ruby-position: {before, after}
3269         https://bugs.webkit.org/show_bug.cgi?id=103569
3270
3271         Reviewed by Anders Carlsson.
3272
3273         Specified in <http://www.w3.org/TR/2011/WD-css3-ruby-20110630/#rubypos>, the ruby-position
3274         property takes four values: before, after, inter-character, and inline. This change adds
3275         support for the values before and after.
3276
3277         Test: fast/ruby/position-after.html
3278
3279         * css/CSSComputedStyleDeclaration.cpp:
3280         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle ruby-position.
3281         * css/CSSParser.cpp:
3282         (WebCore::isValidKeywordPropertyAndValue): Accept before and after as valid values for
3283         ruby-position.
3284         (WebCore::isKeywordPropertyID): Added ruby-position to the list of properties with keyword
3285         values.
3286         (WebCore::CSSParser::parseValue): Added ruby-position to the switch statement.
3287         * css/CSSPrimitiveValueMappings.h:
3288         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added mapping from RubyPosition.
3289         (WebCore::CSSPrimitiveValue::operator RubyPosition): Added mapping from CSSPrimitiveValue.
3290         * css/CSSProperty.cpp:
3291         (WebCore::CSSProperty::isInheritedProperty): Added ruby-position as an inherited property.
3292         * css/CSSPropertyNames.in: Added -webkit-ruby-position.
3293         * css/CSSValueKeywords.in: Added after and before.
3294         * css/StyleBuilder.cpp:
3295         (WebCore::StyleBuilder::StyleBuilder): Added a handler for ruby-position.
3296         * css/StyleResolver.cpp:
3297         (WebCore::StyleResolver::applyProperty): Added ruby-position.
3298         * rendering/InlineFlowBox.cpp:
3299         (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Changed to choose which of
3300         hasAnnotationsBefore and hasAnnotationsAfter to set based on ruby position.
3301         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): Changed to adjust only for
3302         ruby positioned before the base.
3303         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment): Added adjustment for ruby
3304         positioned after the base.
3305         * rendering/RenderRubyRun.cpp:
3306         (WebCore::RenderRubyRun::layout): Account for ruby-position when positioning the ruby text
3307         relative to the base.
3308         * rendering/style/RenderStyle.cpp:
3309         (WebCore::RenderStyle::diff): Made a ruby-position difference a layout difference.
3310         * rendering/style/RenderStyle.h: Added rubyPosition(), setRubyPosition(), and 
3311         initialRubyPosition().
3312         * rendering/style/RenderStyleConstants.h: Added the RubyPosition enum.
3313         * rendering/style/StyleRareInheritedData.cpp:
3314         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Added initialized for
3315         m_rubyPosition. Added copying the value of this member to the copy constructor.
3316         (WebCore::StyleRareInheritedData::operator==): Added comparison of m_rubyPosition.
3317         * rendering/style/StyleRareInheritedData.h:
3318         (StyleRareInheritedData): Added m_rubyPosition member variable.
3319
3320 2012-11-29  Tiancheng Jiang  <tijiang@rim.com>
3321
3322         [BlackBerry] Update BB10 form theme.
3323         https://bugs.webkit.org/show_bug.cgi?id=100760
3324
3325         Reviewed by Rob Buis.
3326
3327         Internally Reviewed by Eli Fidler.
3328         Set text color after buttons are pressed.
3329
3330         * css/themeBlackBerry.css:
3331         (input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active::-webkit-file-upload-button, button:active):
3332         (select:active):
3333         * platform/blackberry/RenderThemeBlackBerry.cpp:
3334         (WebCore):
3335         (WebCore::RenderThemeBlackBerry::paintButton):
3336         (WebCore::RenderThemeBlackBerry::paintMenuList):
3337
3338 2012-11-29  Zeno Albisser  <zeno@webkit.org>
3339
3340         GraphicsSurfaceGLX: remove redundant parameter from resolveGLMethods.
3341         https://bugs.webkit.org/show_bug.cgi?id=103636
3342
3343         Reviewed by Kenneth Rohde Christiansen.
3344
3345         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
3346         (WebCore::resolveGLMethods):
3347         (WebCore::GraphicsSurface::platformCreate):
3348         (WebCore::GraphicsSurface::platformImport):
3349
3350 2012-11-29  Mike West  <mkwst@chromium.org>
3351
3352         Typo in 'autofocus' sandboxing error message.
3353         https://bugs.webkit.org/show_bug.cgi?id=103616
3354
3355         Reviewed by Jochen Eisinger.
3356
3357         The sandbox attribute name is 'allow-scripts', not 'allow-script'. :(
3358
3359         * html/HTMLFormControlElement.cpp:
3360         (WebCore::shouldAutofocus):
3361
3362 2012-11-29  Hajime Morrita  <morrita@google.com>
3363
3364         HTMLMediaElement's .textTracks property does not reflect <track> element
3365         https://bugs.webkit.org/show_bug.cgi?id=103420
3366
3367         Reviewed by Eric Carlson.
3368
3369         There were some assumptions that <track> elements are valid only
3370         if the parent <media> is in document. This change relaxes this
3371         assumption so that <track> is valid when it has <media> as a
3372         parent regardless whether the <media> is in the document or not.
3373
3374         HTMLMediaElement::didAddTrack and didRemoveTrack are now called
3375         when the <track> is inserted to or removed from the parent <media>
3376         element.
3377
3378         Test: media/track/track-node-add-remove.html
3379
3380         * html/HTMLMediaElement.cpp:
3381         (WebCore::HTMLMediaElement::didRemoveTrack):
3382         Renamed from willRemoveTrack() to reflect the timing. This was once called from
3383         Node::willRemove(), which was removed a while ago.
3384         * html/HTMLMediaElement.h:
3385         (HTMLMediaElement):
3386         * html/HTMLTrackElement.cpp:
3387         (WebCore::HTMLTrackElement::insertedInto):
3388         The old code notified parent <media> only if the subtree became a part of the document.
3389         Now it notifies the <media> when this <track> becomes a child of that <media>.
3390
3391         (WebCore::HTMLTrackElement::removedFrom):
3392         The old code notifies the parent <media> every time as long as the parent is available.
3393         Now it notifies the <media> only if this <track> is removed from the parent <media>.
3394         This matches how corresponding notification is done in insertedInto().
3395
3396         * html/track/LoadableTextTrack.cpp:
3397         (WebCore::LoadableTextTrack::trackElementIndex):
3398
3399 2012-11-29  Florin Malita  <fmalita@chromium.org>
3400
3401         [Skia] Add missing OpaqueRegionSkia notifier calls
3402         https://bugs.webkit.org/show_bug.cgi?id=102824
3403
3404         Reviewed by Stephen White.
3405
3406         http://trac.webkit.org/changeset/135390 exposed some canvas draw clients which are not
3407         updating the opaque region tracker. This patch adds the required notifier calls.
3408
3409         No new tests: platform unit tests added.
3410
3411         * platform/graphics/skia/OpaqueRegionSkia.h:
3412         (OpaqueRegionSkia):
3413         * platform/graphics/skia/PlatformContextSkia.h:
3414         (WebCore::PlatformContextSkia::writePixels):
3415         (WebCore::PlatformContextSkia::drawBitmap):
3416         (WebCore::PlatformContextSkia::drawBitmapRect):
3417         (WebCore::PlatformContextSkia::drawIRect):
3418         (WebCore::PlatformContextSkia::drawPosText):
3419         (WebCore::PlatformContextSkia::drawPosTextH):
3420         (WebCore::PlatformContextSkia::drawTextOnPath):
3421
3422 2012-11-29  Andy Shaw  <andy.shaw@digia.com>
3423
3424         [Qt] Implement support for Cocoa based NPAPI plugins on Mac
3425         https://bugs.webkit.org/show_bug.cgi?id=72358
3426
3427         Reviewed by Simon Hausmann.
3428
3429         With later versions of Flash they are only Cocoa based which meant that it was not possible to use Flash in a QtWebKit browser.
3430         This makes it possible to also use 64bit based plugins too.  
3431
3432         * plugins/PluginPackage.cpp:
3433         (WebCore::PluginPackage::initializeBrowserFuncs):
3434         (WebCore):
3435         * plugins/PluginQuirkSet.h:
3436         * plugins/PluginView.cpp:
3437         (WebCore::PluginView::handleEvent):
3438         (WebCore::PluginView::PluginView):
3439         (WebCore):
3440         (WebCore::PluginView::userAgent):
3441         * plugins/PluginView.h:
3442         (WebCore):
3443         (PluginView):
3444         * plugins/mac/PluginPackageMac.cpp:
3445         (WebCore::PluginPackage::determineQuirks):
3446         (WebCore::PluginPackage::fetchInfo):
3447         * plugins/mac/PluginViewMac.mm:
3448         (WebCore):
3449         (WebCore::initializeNPCocoaEvent):
3450         (WebCore::getModifiers):
3451         (WebCore::PluginView::platformStart):
3452         * plugins/npapi.cpp:
3453         (NPN_PopUpContextMenu):
3454         * plugins/npapi.h:
3455
3456 2012-11-29  Sheriff Bot  <webkit.review.bot@gmail.com>
3457
3458         Unreviewed, rolling out r136111.
3459         http://trac.webkit.org/changeset/136111