7e2b885f0d08460d6cb4a74e2d7755a6a70b109d
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-04  Kentaro Hara  <haraken@chromium.org>
2
3         [V8] Remove IntegerCache::m_initialized
4         https://bugs.webkit.org/show_bug.cgi?id=103978
5
6         Reviewed by Adam Barth.
7
8         Thanks to r136479, we can now initialize V8 integers in IntegerCache's
9         constructor. We can remove IntegerCache::m_initialized, which slightly
10         improves performance.
11
12         [Bindings/scroll-top.html in Chromium/Linux]
13         Before this patch: 285 runs/sec, 281 runs/sec, 281 runs/sec, 280 runs/sec
14         After this patch : 290 runs/sec, 291 runs/sec, 297 runs/sec, 291 runs/sec
15
16         No tests. No change in behavior.
17
18         * bindings/v8/V8ValueCache.cpp:
19         (WebCore::IntegerCache::IntegerCache):
20         (WebCore::IntegerCache::~IntegerCache):
21         * bindings/v8/V8ValueCache.h:
22         (IntegerCache):
23         (WebCore::IntegerCache::v8Integer):
24         (WebCore::IntegerCache::v8UnsignedInteger):
25         (WebCore):
26
27 2012-12-04  Kentaro Hara  <haraken@chromium.org>
28
29         [V8] Replace String::New("symbol") with String::NewSymbol("symbol")
30         https://bugs.webkit.org/show_bug.cgi?id=103989
31
32         Reviewed by Adam Barth.
33
34         In V8, a symbol lookup is faster than a string lookup. We should use
35         String::NewSymbol("symbol") for symbols.
36
37         No tests. No change in behavior.
38
39         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
40         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
41         (WebCore::V8HTMLCanvasElement::getContextCallback):
42         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
43         (WebCore::V8InjectedScriptHost::typeCallback):
44         (WebCore::V8InjectedScriptHost::functionDetailsCallback):
45         (WebCore::getJSListenerFunctions):
46         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
47         (WebCore::populateContextMenuItems):
48
49 2012-12-04  Julien Chaffraix  <jchaffraix@webkit.org>
50
51         [CSS Grid Layout] Implement CSS parsing and handling for <track-minmax>
52         https://bugs.webkit.org/show_bug.cgi?id=103799
53
54         Reviewed by Tony Chang.
55
56         This change adds support for:
57         <track-minmax> => minmax( <track-breadth> , <track-breadth> ) | auto | <track-breadth>
58         (note that we already supported auto | <track-breadth>).
59
60         The change is mostly mechanical, the only newness is that GridTrackSize was updated to
61         hold 2 Lengths internally and we map the single Length case to 2 by duplicating the value
62         as this matches the rendering algorithm in the spec.
63
64         Tests: fast/css-grid-layout/grid-columns-rows-get-set-multiple.html
65                fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js
66
67         * css/CSSComputedStyleDeclaration.cpp:
68         (WebCore::valueForGridTrackBreadth):
69         Changed the function to do the conversion of one track breadth (one Length).
70         This was forgotten in the preparatory change in bug 103703.
71
72         (WebCore::valueForGridTrackMinMax):
73         Convert the value back using valueForGridTrackBreadth.
74
75         * css/CSSFunctionValue.cpp:
76         (WebCore::CSSFunctionValue::CSSFunctionValue):
77         * css/CSSFunctionValue.h:
78         (WebCore::CSSFunctionValue::create):
79         (CSSFunctionValue):
80         Added a new constructor. This enables us to return minmax(..., ...) when queried
81         from JavaScript. I couldn't find a better way to serialize inside CSSComputedStyleDeclaration
82         so that it properly match the function output.
83
84         * css/CSSParser.cpp:
85         (WebCore::CSSParser::parseGridTrackMinMax):
86         Added parsing for the new syntax. We convert the 2 values into a Pair if we manage to
87         parse both values correctly.
88
89         * css/StyleResolver.cpp:
90         (WebCore::createGridTrackMinMax):
91         Updated to handle a Pair - for minmax - and set the 2 values on GridTrackSize.
92
93         * rendering/RenderGrid.cpp:
94         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
95         Updated to check the style. For now, we don't handle minmax values.
96
97         * rendering/style/GridTrackSize.h:
98         (WebCore::GridTrackSize::GridTrackSize):
99         (WebCore::GridTrackSize::length):
100         (WebCore::GridTrackSize::setLength):
101         (WebCore::GridTrackSize::minTrackBreadth):
102         (WebCore::GridTrackSize::maxTrackBreadth):
103         (WebCore::GridTrackSize::setMinMax):
104         (WebCore::GridTrackSize::operator==):
105         Updated the class to handle minmax values. This means that we now always store
106         2 values (the <length> case being a subset of minmax, however we kept the distinction
107         to be able to reconstruct a <length> for getComputedStyle).
108
109 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
110
111         parser* methods in ContainerNode should not support DocumentFragment
112         https://bugs.webkit.org/show_bug.cgi?id=103965
113
114         Reviewed by Darin Adler.
115
116         Only parserInsertBefore ever supported DocumentFragment and this feature
117         is never used. It appears this code ended up in parserInsertBefore when
118         it was created as a copy of insertBefore that didn't fire events. This
119         patch removes that code and adds assertions that we never pass
120         DocumentFragments since doing so would cause a corrupted tree as we never
121         check checkAcceptChild or do other validation in the parser methods.
122
123         No new tests, just refactoring.
124
125         * dom/ContainerNode.cpp:
126         (WebCore::ContainerNode::parserInsertBefore):
127         (WebCore::ContainerNode::parserRemoveChild):
128         (WebCore::ContainerNode::parserAppendChild):
129
130 2012-12-04  Elliott Sprehn  <esprehn@gmail.com>
131
132         Simplify ShadowRoot::cloneNode(bool,ExceptionCode)
133         https://bugs.webkit.org/show_bug.cgi?id=103928
134
135         Reviewed by Dimitri Glazkov.
136
137         ShadowRoot can never be cloned and ShadowRoot::cloneNode(bool) always
138         returns null so there's no reason to have code in the cloneNode method
139         for script that acts as if it may not return null.
140
141         * dom/ShadowRoot.cpp:
142         (WebCore::ShadowRoot::cloneNode):
143
144 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
145
146         setIsInTopLayer is not really a setter
147         https://bugs.webkit.org/show_bug.cgi?id=103912
148
149         Reviewed by Eric Seidel.
150
151         Element::setInTopLayer isn't just a setter, it also adds the element
152         to the top layer vector in the document which changes it's display and
153         causes a reattach.
154
155         To make this more obvious make HTMLDialogElement use the methods on
156         Document and make those update the state boolean.
157
158         There also doesn't seem to be any reason for setInTopLayer
159         or isInTopLayer to be virtual, it appears it was a typo.
160
161         No new tests, just refactoring.
162
163         * dom/Document.cpp:
164         (WebCore::Document::addToTopLayer):
165         (WebCore::Document::removeFromTopLayer):
166         * dom/Element.cpp:
167         (WebCore::Element::setIsInTopLayer):
168         * dom/Element.h:
169         * html/HTMLDialogElement.cpp:
170         (WebCore::HTMLDialogElement::close):
171         (WebCore::HTMLDialogElement::showModal):
172
173 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
174
175         Automatically handle suspend and resume of post attach callbacks
176         https://bugs.webkit.org/show_bug.cgi?id=103910
177
178         Reviewed by Eric Seidel.
179
180         Use RAII to handle suspend and resume of post attach callbacks since
181         they should always be called in pairs.
182
183         No new tests, just refactoring.
184
185         * dom/ContainerNode.h:
186         (PostAttachCallbackDisabler):
187         (WebCore::PostAttachCallbackDisabler::PostAttachCallbackDisabler):
188         (WebCore::PostAttachCallbackDisabler::~PostAttachCallbackDisabler):
189         (ContainerNode):
190         * dom/Document.cpp:
191         (WebCore::Document::recalcStyle):
192         * dom/Element.cpp:
193         (WebCore::Element::attach):
194         * html/HTMLFormControlElement.cpp:
195         (WebCore::HTMLFormControlElement::attach):
196         * html/HTMLInputElement.cpp:
197         (WebCore::HTMLInputElement::attach):
198         * html/HTMLPlugInImageElement.cpp:
199         (WebCore::HTMLPlugInImageElement::attach):
200         (WebCore):
201
202 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
203
204         createRareData should return a PassOwnPtr
205         https://bugs.webkit.org/show_bug.cgi?id=103851
206
207         Reviewed by Eric Seidel.
208
209         createRareData should return a PassOwnPtr, not an OwnPtr since it's
210         transfering ownership.
211
212         * dom/Element.cpp:
213         (WebCore::Element::createRareData):
214         * dom/Element.h:
215         (Element):
216         * dom/Node.cpp:
217         (WebCore::Node::createRareData):
218         * dom/Node.h:
219
220 2012-12-04  Filip Pizlo  <fpizlo@apple.com>
221
222         Rename Profiler to LegacyProfiler
223         https://bugs.webkit.org/show_bug.cgi?id=104031
224
225         Rubber stamped by Mark Hahnenberg
226
227         Just renaming, no new tests.
228
229         * ForwardingHeaders/profiler/LegacyProfiler.h: Copied from Source/WebCore/ForwardingHeaders/profiler/Profiler.h.
230         * ForwardingHeaders/profiler/Profiler.h: Removed.
231         * bindings/js/ScriptProfiler.cpp:
232         (WebCore::ScriptProfiler::start):
233         (WebCore::ScriptProfiler::stop):
234
235 2012-12-04  James Simonsen  <simonjam@chromium.org>
236
237         [User Timing] Fix clang build by removing need for exit time destructor
238         https://bugs.webkit.org/show_bug.cgi?id=104036
239
240         Reviewed by Tony Gentilcore.
241
242         Modeled after r99588.
243
244         No new tests. No change in functionality.
245
246         * page/PerformanceUserTiming.cpp:
247         (WebCore::UserTiming::UserTiming):
248         (WebCore::UserTiming::mark):
249         (WebCore::UserTiming::findExistingMarkStartTime):
250         * page/PerformanceUserTiming.h:
251         (UserTiming):
252
253 2012-12-04  James Simonsen  <simonjam@chromium.org>
254
255         [User Timing] Fix negative durations
256         https://bugs.webkit.org/show_bug.cgi?id=104038
257
258         Reviewed by Tony Gentilcore.
259
260         At some point, we went from passing in a duration to passing in the end time. User Timing
261         wasn't updated.
262
263         Tests: http/tests/w3c/webperf/submission/Intel/user-timing
264
265         * page/PerformanceMark.h:
266         (WebCore::PerformanceMark::PerformanceMark):
267         * page/PerformanceUserTiming.cpp:
268         (WebCore::UserTiming::measure):
269
270 2012-12-04  Abhishek Arya  <inferno@chromium.org>
271
272         Heap-use-after-free in WebCore::StyleCachedImageSet::cssValue
273         https://bugs.webkit.org/show_bug.cgi?id=100621
274
275         Reviewed by Eric Seidel.
276
277         r115639 fixed a memory leak caused by reference cycle between StyleCachedImageSet
278         and its owner CSSImageSetValue. The fix caused StyleCachedImageSet to maintain
279         a weak pointer to CSSImageSetValue. This patch makes sure that the weak pointer
280         is cleared when CSSImageSetValue is going away.
281
282         Test: fast/css/image-set-value-not-removed-crash.html
283
284         * css/CSSImageSetValue.cpp:
285         (WebCore::CSSImageSetValue::~CSSImageSetValue):
286         * rendering/style/StyleCachedImageSet.h:
287         (WebCore::StyleCachedImageSet::clearImageSetValue):
288         (StyleCachedImageSet):
289
290 2012-12-04  Adam Barth  <abarth@webkit.org>
291
292         NodeFilter leaks memory in V8
293         https://bugs.webkit.org/show_bug.cgi?id=104027
294
295         Reviewed by Eric Seidel.
296
297         NodeFilter holds a RefPtr to NodeFilterCondition, which holds a
298         ScopedPersistent to its callback function. If the callback function can
299         see the NodeFilter wrapper, we have a cycle and a leak.
300
301         This patch makes the NodeFilterCondition hold a weak pointer to the
302         callback function and ties the lifetime of that callback function to
303         the NodeFilter wrapper (so they live and die together).
304
305         * bindings/v8/V8GCController.cpp:
306         * bindings/v8/V8NodeFilterCondition.cpp:
307         (WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
308         (WebCore::V8NodeFilterCondition::weakCallback):
309         (WebCore):
310         (WebCore::V8NodeFilterCondition::acceptNode):
311         * bindings/v8/V8NodeFilterCondition.h:
312         (WebCore::V8NodeFilterCondition::create):
313         (V8NodeFilterCondition):
314         (WebCore::V8NodeFilterCondition::callback):
315         * dom/NodeFilter.h:
316         (WebCore::NodeFilter::condition):
317
318 2012-12-04  Abhishek Arya  <inferno@chromium.org>
319
320         Crash in CachedResource::checkNotify due to -webkit-crossfade.
321         https://bugs.webkit.org/show_bug.cgi?id=98068
322
323         Reviewed by Nate Chapin.
324
325         Make sure to not re-add the same client again for |m_cachedFromImage|
326         and |m_cachedToImage|. This would otherwise cause the CSSCrossfadeValue
327         client to not get removed from its cached image resource (when it is
328         going away).
329
330         Test: fast/images/crossfade-client-not-removed-crash.html
331
332         * css/CSSCrossfadeValue.cpp:
333         (WebCore::CSSCrossfadeValue::loadSubimages):
334
335 2012-12-04  Julien Chaffraix  <jchaffraix@webkit.org>
336
337         Heap-use-after-free in WebCore::RenderLayer::paintList [MathML]
338         https://bugs.webkit.org/show_bug.cgi?id=100764
339
340         Reviewed by Eric Seidel.
341
342         Test: mathml/mfenced-root-layer.html
343
344         * rendering/RenderLayer.cpp:
345         (WebCore::RenderLayer::stackingContext):
346         Fixed this function to ensure that it always returns a stacking context, the bug
347         was that the document element's layer wasn't guaranteed to be a stacking context.
348
349 2012-12-04  Adam Barth  <abarth@webkit.org>
350
351         [V8] GetNativeType in CodeGeneratorV8.pm needs a bath
352         https://bugs.webkit.org/show_bug.cgi?id=104022
353
354         Reviewed by Eric Seidel.
355
356         This change shouldn't have any effect on the generated code.
357
358         * bindings/scripts/CodeGeneratorV8.pm:
359         (GetNativeType):
360             - DOMUserData was removed in 2005. There's no need for the code
361               generator to still know about it.
362         (JSValueToNative):
363         (ConvertToV8StringResource):
364
365 2012-12-04  Adam Barth  <abarth@webkit.org>
366
367         [V8] EventTarget shouldn't be a special snowflake
368         https://bugs.webkit.org/show_bug.cgi?id=104018
369
370         Reviewed by Eric Seidel.
371
372         Previously we special-cased the toV8 operation for event targets.
373         There's no need for that. We can use IDL attribute to handle
374         EventTarget using the same general-purpose code that we use for other
375         interfaces.
376
377         * WebCore.gypi:
378         * bindings/scripts/CodeGeneratorV8.pm:
379         (NativeToJSValue):
380         * bindings/v8/V8AbstractEventListener.cpp:
381         (WebCore::V8AbstractEventListener::getReceiverObject):
382         * bindings/v8/V8DOMWrapper.cpp:
383         * bindings/v8/V8DOMWrapper.h:
384         (V8DOMWrapper):
385         * bindings/v8/V8WorkerContextEventListener.cpp:
386         (WebCore::V8WorkerContextEventListener::getReceiverObject):
387         * bindings/v8/custom/V8EventTargetCustom.cpp: Added.
388         (WebCore):
389         (WebCore::toV8):
390         * dom/EventTarget.idl:
391
392 2012-12-04  Florin Malita  <fmalita@chromium.org>
393
394         Stale SVGUseElement reference in CachedResource::checkNotify()
395         https://bugs.webkit.org/show_bug.cgi?id=104004
396
397         Reviewed by Eric Seidel.
398
399         SVGUseElement tracks one CachedSVGDocument at a time (for external references), but when
400         the href attribute is updated it fails to unregister with the current CachedSVGDocument
401         and only updates its CachedSVGDocument with the new instance. This leaves an untracked
402         reference with the original CachedSVGDocument.
403
404         The patch adds the missing removeClient() call on href change, and encapsulates the
405         CachedSVGDocument manipulation in a helper method which handles the necessary cleanup.
406
407         Test: svg/custom/use-href-update-crash.svg
408
409         * svg/SVGUseElement.cpp:
410         (WebCore::SVGUseElement::~SVGUseElement):
411         (WebCore::SVGUseElement::svgAttributeChanged):
412         (WebCore::SVGUseElement::setCachedDocument):
413         (WebCore):
414         * svg/SVGUseElement.h:
415         (SVGUseElement):
416
417 2012-12-04  Yury Semikhatsky  <yurys@chromium.org>
418
419         Web Inspector: Can't take a heap snapshot in chromium ("Uncaught ReferenceError")
420         https://bugs.webkit.org/show_bug.cgi?id=103997
421
422         Reviewed by Pavel Feldman.
423
424         utilities.js used in both page and worker contexts should not access window
425         object as there is no one in case of workers. NonLeakingMutationObserver implementation
426         has moved to DOMExtension.js
427
428         * inspector/front-end/DOMExtension.js:
429         (NonLeakingMutationObserver.NonLeakingMutationObserver._unloadListener):
430         (NonLeakingMutationObserver):
431         (NonLeakingMutationObserver.prototype.observe):
432         (NonLeakingMutationObserver.prototype.disconnect):
433         * inspector/front-end/utilities.js:
434
435 2012-12-04  Sheriff Bot  <webkit.review.bot@gmail.com>
436
437         Unreviewed, rolling out r136509.
438         http://trac.webkit.org/changeset/136509
439         https://bugs.webkit.org/show_bug.cgi?id=104015
440
441         broke layout tests (Requested by eae on #webkit).
442
443         * platform/graphics/IntSize.h:
444         (WebCore::IntSize::scale):
445
446 2012-12-04  Antoine Quint  <graouts@apple.com>
447
448         INVALID_STATE_ERR error upon calling .addCue() for an already-in-use cue
449         https://bugs.webkit.org/show_bug.cgi?id=103264
450
451         Reviewed by Eric Carlson.
452
453         Adhere to the latest spec for TextTrack's .addCue() method. This also fixes
454         https://bugs.webkit.org/show_bug.cgi?id=103265 and we've removed
455         media/track/opera/interfaces/TextTrack/addCue.html from the Skipped list.
456
457         * html/track/TextTrack.cpp:
458         (WebCore::TextTrack::addCue):
459         * html/track/TextTrack.h:
460         (TextTrack):
461         * html/track/TextTrack.idl:
462
463 2012-12-04  Mike West  <mkwst@chromium.org>
464
465         Log to console when forms and popups are blocked by 'sandbox'.
466         https://bugs.webkit.org/show_bug.cgi?id=103615
467
468         Reviewed by Adam Barth.
469
470         Adds two console messages to cover form submissions blocked by a
471         sandboxed frame lacking the 'allow-forms' permission, and window
472         creation blocked by a sandboxed frame lacking the 'allow-popups'
473         permission.
474
475         * loader/FrameLoader.cpp:
476         (WebCore::FrameLoader::submitForm):
477             Log a warning when form submission is blocked by sandboxing flags.
478         (WebCore::createWindow):
479             Log a warning when window.open is blocked due to sandboxing flags.
480
481 2012-12-04  Kentaro Hara  <haraken@chromium.org>
482
483         [V8] Make v8::Null(isolate) faster by caching the value in V8 bindings
484         https://bugs.webkit.org/show_bug.cgi?id=103862
485
486         Reviewed by Adam Barth.
487
488         Performance comparison between V8 and JSC revealed that DOM attributes
489         that return v8::Null(isolate) are much slower than JSC.
490         (https://docs.google.com/a/chromium.org/spreadsheet/ccc?key=0AlobCOyvTnPKdDg5S0dMdGRGRTRSaW53V1ppVzh6eXc#gid=2)
491
492         We can optimize v8::Null(isolate) by caching the value to V8PerIsolateData.
493         (Although I don't like the optimization, it looks difficult to optimize
494         v8::Null(isolate) more.)
495
496         [Bindings/undefined-first-child.html]
497         Before: 969 runs/sec, 970 runs/sec, 962 runs/sec
498         After:  1086 runs/sec, 1085 runs/sec, 1086 runs/sec
499
500         No tests. No change in behavior.
501
502         * bindings/scripts/CodeGeneratorV8.pm:
503         (GenerateHeader):
504         (GenerateNormalAttrGetter):
505         (GenerateFunctionCallback):
506         (NativeToJSValue):
507         * bindings/scripts/test/V8/V8TestNode.h:
508         (WebCore::toV8Fast):
509         * bindings/scripts/test/V8/V8TestObj.cpp:
510         (WebCore::TestObjV8Internal::contentDocumentAttrGetter):
511         (WebCore::TestObjV8Internal::getSVGDocumentCallback):
512         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
513         (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter):
514         (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter):
515         (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter):
516         (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter):
517         * bindings/v8/V8Binding.h:
518         (WebCore):
519         (WebCore::v8Null):
520         (WebCore::v8NullWithCheck):
521         * bindings/v8/V8PerIsolateData.cpp:
522         (WebCore::V8PerIsolateData::V8PerIsolateData):
523         * bindings/v8/V8PerIsolateData.h:
524         (WebCore::V8PerIsolateData::v8Null):
525         (V8PerIsolateData):
526
527 2012-12-04  Alexis Menard  <alexis@webkit.org>
528
529         Add an helper function in CSSParser to check for '/' character.
530         https://bugs.webkit.org/show_bug.cgi?id=104009
531
532         Reviewed by Ryosuke Niwa.
533
534         Remove unwanted null check from r136525
535
536         No new tests : just a refactor, existing tests should cover.
537
538         * css/CSSParser.cpp:
539         (WebCore::isForwardSlashOperator):
540
541 2012-12-04  Alexis Menard  <alexis@webkit.org>
542
543         Add an helper function in CSSParser to check for '/' character.
544         https://bugs.webkit.org/show_bug.cgi?id=104009
545
546         Reviewed by Ryosuke Niwa.
547
548         I'm about to add the same pattern in a following patch. Let's do an
549         helper function first. We also did that for the comma. The slash
550         character is pretty used in shorthands definitions.
551
552         No new tests : just a refactor, existing tests should cover.
553
554         * css/CSSParser.cpp:
555         (WebCore::isForwardSlashOperator):
556         (WebCore):
557         (WebCore::CSSParser::parseFillShorthand):
558         (WebCore::CSSParser::parseFont):
559         (WebCore::CSSParser::parseBorderImage):
560         (WebCore::CSSParser::parseAspectRatio):
561
562 2012-12-04  Ken Kania  <kkania@chromium.org>
563
564         Inspector: Introduce Input.dispatchKeyEvent and DOM.focus for typing simulation.
565         https://bugs.webkit.org/show_bug.cgi?id=103530
566
567         Reviewed by Yury Semikhatsky.
568
569         Input.dispatchKeyEvent simply calls EventHandler::keyEvent with the key event data
570         from the command parameters. The client will be responsible for providing proper
571         events to simulate desired typing behavior.
572         DOM.focus calls focus on a dom element.
573
574         Tests: inspector-protocol/dom-focus.html
575                inspector-protocol/input-dispatchKeyEvent.html
576
577         * CMakeLists.txt:
578         * GNUmakefile.list.am:
579         * Target.pri:
580         * WebCore.gypi:
581         * WebCore.vcproj/WebCore.vcproj:
582         * WebCore.xcodeproj/project.pbxproj:
583         * inspector/Inspector.json:
584         * inspector/InspectorAllInOne.cpp:
585         * inspector/InspectorController.cpp:
586         (WebCore::InspectorController::InspectorController):
587         * inspector/InspectorDOMAgent.cpp:
588         (WebCore::InspectorDOMAgent::focus):
589         (WebCore):
590         (WebCore::InspectorDOMAgent::resolveNode):
591         * inspector/InspectorDOMAgent.h:
592         (InspectorDOMAgent):
593         * inspector/InspectorInputAgent.cpp: Added.
594         (WebCore):
595         (WebCore::InspectorInputAgent::InspectorInputAgent):
596         (WebCore::InspectorInputAgent::~InspectorInputAgent):
597         (WebCore::InspectorInputAgent::dispatchKeyEvent):
598         * inspector/InspectorInputAgent.h: Added.
599         (WebCore):
600         (InspectorInputAgent):
601         (WebCore::InspectorInputAgent::create):
602
603 2012-12-04  Dan Bernstein  <mitz@apple.com>
604
605         FontPlatformData has unnecessary m_textOrientation member
606         https://bugs.webkit.org/show_bug.cgi?id=103971
607
608         Reviewed by Darin Adler.
609
610         Nothing in SimpleFontData depends on the FontPlatformData’s textOrientation, so we don’t
611         need separate data for vertical-right and upright. We simply choose between
612         verticalRightOrientationFontData() and uprightOrientationFontData() based on the
613         textOrientation in the FontDescription.
614
615         * WebCore.exp.in: Updated FontPlatformData constructor exports.
616
617         * css/CSSFontFaceSource.cpp:
618         (WebCore::CSSFontFaceSource::getFontData): Removed the text orientation bit from the hash key,
619         and updated for the removal of the TextOrientation parameter to
620         CachedFont::platformDataFromCustomData().
621
622         * loader/cache/CachedFont.cpp:
623         (WebCore::CachedFont::platformDataFromCustomData): Removed the TextOrientation parameter.
624         * loader/cache/CachedFont.h:
625
626         * platform/graphics/FontCache.cpp:
627         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey): Removed the TextOrientation
628         parameter and initializer.
629         (WebCore::FontPlatformDataCacheKey::operator==): Updated for removal of m_textOrientation
630         member variable.
631         (FontPlatformDataCacheKey): Removed m_textOrientation member variable.
632         (WebCore::computeHash): Removed text orientation bit from the hash.
633         (WebCore::FontCache::getCachedFontPlatformData): Updated for FontPlatformDataCacheKey
634         change.
635
636         * platform/graphics/FontPlatformData.cpp:
637         (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameters and
638         initializers.
639         (WebCore::FontPlatformData::operator=): Updated for removal of m_textOrientation
640         member variable.
641         * platform/graphics/FontPlatformData.h:
642         (FontPlatformData): Removed m_textOrientation member variable, removed TextOrientation
643         parameters from constructors.
644         (WebCore::FontPlatformData::hash): Removed text orientation bit.
645         (WebCore::FontPlatformData::operator==): Updated for removed member variable.
646
647         * platform/graphics/cairo/FontCustomPlatformData.h:
648         (FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
649
650         * platform/graphics/chromium/FontCacheAndroid.cpp:
651         (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change.
652
653         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
654         (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameter and
655         initializer.
656
657         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
658         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
659         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
660         (WebCore::FontPlatformData::FontPlatformData): Removed TextOrientation parameter and
661         initializers.
662         (WebCore::FontPlatformData::operator=): Updated for removed member variable.
663         (WebCore::FontPlatformData::operator==): Ditto.
664         (WebCore::FontPlatformData::hash): Removed text orientation bit.
665
666         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
667         (FontPlatformData): Removed TextOrientation parameter from the constructor declaration.
668
669         * platform/graphics/mac/FontCacheMac.mm:
670         (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change.
671
672         * platform/graphics/mac/FontCustomPlatformData.cpp:
673         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
674
675         * platform/graphics/mac/FontCustomPlatformData.h:
676         (FontCustomPlatformData): Removed TextOrientation parameter from declaration of
677         fontPlatformData().
678
679         * platform/graphics/mac/SimpleFontDataMac.mm:
680         (WebCore::SimpleFontData::getCompositeFontReferenceFontData): Updated for FontPlatformData
681         change.
682
683         * platform/graphics/pango/FontCustomPlatformDataPango.cpp:
684         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
685         * platform/graphics/qt/FontCustomPlatformData.h:
686
687         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
688         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
689
690         * platform/graphics/skia/FontCacheSkia.cpp:
691         (WebCore::FontCache::createFontPlatformData): Updated for FontPlatformData change.
692
693         * platform/graphics/skia/FontCustomPlatformData.cpp:
694         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
695         * platform/graphics/skia/FontCustomPlatformData.h:
696
697         * platform/graphics/win/FontCustomPlatformData.cpp:
698         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
699         * platform/graphics/win/FontCustomPlatformData.h:
700
701         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
702         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
703         * platform/graphics/win/FontCustomPlatformDataCairo.h:
704
705         * platform/graphics/win/FontPlatformDataCGWin.cpp:
706         (WebCore::FontPlatformData::FontPlatformData): Removed m_textOrientation initializer.
707
708         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
709         (WebCore::FontPlatformData::FontPlatformData): Ditto.
710
711         * platform/graphics/win/FontPlatformDataWin.cpp:
712         (WebCore::FontPlatformData::FontPlatformData): Ditto.
713
714         * platform/graphics/wince/FontCustomPlatformData.cpp:
715         (WebCore::FontCustomPlatformData::fontPlatformData): Removed TextOrientation parameter.
716         * platform/graphics/wince/FontCustomPlatformData.h:
717
718 2012-12-04  Charlie Reis  <creis@chromium.org>
719
720         Add FrameLoaderClient::didDisownOpener
721         https://bugs.webkit.org/show_bug.cgi?id=103789
722
723         Reviewed by Darin Fisher.
724
725         Adds a didDisownOwner notification when a frame's opener is cleared,
726         so that FrameLoaderClients can react.
727
728         No new tests.
729
730         * loader/FrameLoader.cpp:
731         (WebCore::FrameLoader::setOpener): Calls didDisownOpener if opener is cleared.
732         * loader/FrameLoaderClient.h:
733         (FrameLoaderClient):
734         (WebCore::FrameLoaderClient::didDisownOpener):
735
736 2012-12-04  Robert Hogan  <robert@webkit.org>
737
738         Redrawing issue with inserting new inline element between existing inline elements
739         https://bugs.webkit.org/show_bug.cgi?id=50315
740
741         Reviewed by Levi Weintraub.
742
743         When inserting an element such as '<span>text<br></span>' between two lineboxes, the second of which has leading space
744         collapsed away after a line-break, dirtyLinesFromChangeChild() needs to ensure that the linebox the fragment is inserted into (the second 
745         of the two lineboxes) gets dirtied. 
746         
747         Since the element has been inserted before the first element in the linebox, but after the collapsed leading
748         space, the search for the new element's linebox will go past the leading space to the previous linebox and select that
749         one by mistake.
750         
751         So in order to ensure the element's linebox is dirtied make sure its previous sibling is not the line-break object of the
752         linebox we selected when searching for a linebox to dirty. If the previous sibling is the linebox's line-break object then
753         the element is in the one after the one we selected and we should dirty that linebox too. 
754
755         Test: fast/inline/layout-after-inserting-nested-br.html
756
757         * rendering/RenderLineBoxList.cpp:
758         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
759
760 2012-12-04  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
761
762         IntSize::scale() should return rounded value
763         https://bugs.webkit.org/show_bug.cgi?id=103984
764
765         Reviewed by Kenneth Rohde Christiansen.
766
767         IntSize::scale() is now rounding float value to the nearest integer instead of blind type casting.
768
769         Test: css3/device-adapt/viewport-width-not-affecting-next-page.html
770
771         * platform/graphics/IntSize.h:
772         (WebCore::IntSize::scale):
773
774 2012-12-04  Adam Bergkvist  <adam.bergkvist@ericsson.com>
775
776         Add support for generic types in arrays and sequences to the code generators
777         https://bugs.webkit.org/show_bug.cgi?id=103642
778
779         Reviewed by Kentaro Hara.
780
781         Updated the bindings generators to support arrays and sequences of host objects.
782
783         - Arrays and sequences of host objects are mapped to Vector<RefPtr<%RefPtrType%> >.
784         - Fixed issue where "sequence<String>" was used in IDL files instead of "sequence<DOMString>".
785
786         Updated existing test results.
787
788         * Modules/indexeddb/IDBDatabase.idl:
789         * Modules/indexeddb/IDBObjectStore.idl:
790         * Modules/mediastream/RTCStatsElement.idl:
791         * Modules/websockets/WebSocket.idl:
792         * bindings/js/JSDOMBinding.h:
793         (WebCore::toRefPtrNativeArray):
794         (WebCore):
795         * bindings/scripts/CodeGenerator.pm:
796         (IsRefPtrType):
797         * bindings/scripts/CodeGeneratorJS.pm:
798         (AddIncludesForType):
799         (GetNativeType):
800         (GetNativeVectorInnerType):
801         (JSValueToNative):
802         (NativeToJSValue):
803         * bindings/scripts/CodeGeneratorV8.pm:
804         (GenerateNormalAttrGetter):
805         (GenerateNormalAttrSetter):
806         (GenerateParametersCheckExpression):
807         (GenerateFunctionCallString):
808         (GetNativeType):
809         (JSValueToNative):
810         (CreateCustomSignature):
811         (NativeToJSValue):
812         * bindings/scripts/test/JS/JSTestObj.cpp:
813         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
814         * bindings/scripts/test/V8/V8TestObj.cpp:
815         (WebCore::TestObjV8Internal::longLongAttrAttrSetter):
816         (WebCore::TestObjV8Internal::unsignedLongLongAttrAttrSetter):
817         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
818         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
819         * bindings/v8/V8Binding.h:
820         (WebCore::toRefPtrNativeArray):
821         * testing/Internals.idl:
822
823 2012-12-04  Antoine Quint  <graouts@apple.com>
824
825         TextTrack's .kind property should return lower-case values
826         https://bugs.webkit.org/show_bug.cgi?id=103411
827
828         Reviewed by Eric Carlson.
829
830         While the HTML "kind" attribute on the <track> element allows upper-case values, the related APIs
831         on HTMLMediaElement and TextTrack expect only to deal with lower-case values. As such, we're updating
832         TextTrack::isValidKindKeyword() to be case-sensitive and ensure that values fed from the DOM (the values
833         read from HTML attributes) are lower-case'd.
834
835         Thanks to this fix, we're no longer skipping media/track/opera/interfaces/TextTrack/kind.html and
836         media/track/opera/interfaces/HTMLElement/HTMLMediaElement/addTextTrack.html 
837
838         This patch also fixes https://bugs.webkit.org/show_bug.cgi?id=103256.
839
840         * html/HTMLTrackElement.cpp:
841         (WebCore::HTMLTrackElement::parseAttribute):
842         (WebCore::HTMLTrackElement::ensureTrack):
843         * html/track/TextTrack.cpp:
844         (WebCore::TextTrack::isValidKindKeyword):
845
846 2012-12-04  Sheriff Bot  <webkit.review.bot@gmail.com>
847
848         Unreviewed, rolling out r136498.
849         http://trac.webkit.org/changeset/136498
850         https://bugs.webkit.org/show_bug.cgi?id=103992
851
852         Patch causes a lot of tests to crash in GTK+ bots (Requested
853         by KaL on #webkit).
854
855         * bindings/scripts/CodeGeneratorGObject.pm:
856         (GenerateProperties):
857         (GenerateHeader):
858         (GenerateCFile):
859         (GenerateEventTargetIface):
860         (WriteData):
861         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
862         (WebKit::core):
863         (WebKit::wrapFloat64Array):
864         (webkit_dom_float64array_finalize):
865         (webkit_dom_float64array_class_init):
866         (webkit_dom_float64array_init):
867         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
868         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
869         (WebKit::core):
870         (WebKit::wrapTestActiveDOMObject):
871         (webkit_dom_test_active_dom_object_finalize):
872         (webkit_dom_test_active_dom_object_class_init):
873         (webkit_dom_test_active_dom_object_init):
874         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
875         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
876         (WebKit::core):
877         (WebKit::wrapTestCallback):
878         (webkit_dom_test_callback_finalize):
879         (webkit_dom_test_callback_class_init):
880         (webkit_dom_test_callback_init):
881         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
882         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
883         (WebKit::core):
884         (WebKit::wrapTestCustomNamedGetter):
885         (webkit_dom_test_custom_named_getter_finalize):
886         (webkit_dom_test_custom_named_getter_class_init):
887         (webkit_dom_test_custom_named_getter_init):
888         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
889         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
890         (WebKit::core):
891         (WebKit::wrapTestEventConstructor):
892         (webkit_dom_test_event_constructor_finalize):
893         (webkit_dom_test_event_constructor_class_init):
894         (webkit_dom_test_event_constructor_init):
895         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
896         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
897         (WebKit::core):
898         (WebKit::wrapTestEventTarget):
899         (webkit_dom_test_event_target_dispatch_event):
900         (webkit_dom_test_event_target_add_event_listener):
901         (webkit_dom_test_event_target_remove_event_listener):
902         (webkit_dom_test_event_target_finalize):
903         (webkit_dom_test_event_target_class_init):
904         (webkit_dom_test_event_target_init):
905         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
906         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
907         (WebKit::core):
908         (WebKit::wrapTestException):
909         (webkit_dom_test_exception_finalize):
910         (webkit_dom_test_exception_class_init):
911         (webkit_dom_test_exception_init):
912         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
913         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
914         (WebKit::core):
915         (WebKit::wrapTestInterface):
916         (webkit_dom_test_interface_finalize):
917         (webkit_dom_test_interface_class_init):
918         (webkit_dom_test_interface_init):
919         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
920         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
921         (WebKit::core):
922         (WebKit::wrapTestMediaQueryListListener):
923         (webkit_dom_test_media_query_list_listener_finalize):
924         (webkit_dom_test_media_query_list_listener_class_init):
925         (webkit_dom_test_media_query_list_listener_init):
926         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
927         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
928         (WebKit::core):
929         (WebKit::wrapTestNamedConstructor):
930         (webkit_dom_test_named_constructor_finalize):
931         (webkit_dom_test_named_constructor_class_init):
932         (webkit_dom_test_named_constructor_init):
933         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
934         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
935         (WebKit::core):
936         (WebKit::wrapTestNode):
937         (webkit_dom_test_node_dispatch_event):
938         (webkit_dom_test_node_add_event_listener):
939         (webkit_dom_test_node_remove_event_listener):
940         (webkit_dom_test_node_finalize):
941         (webkit_dom_test_node_class_init):
942         (webkit_dom_test_node_init):
943         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
944         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
945         (WebKit::core):
946         (WebKit::wrapTestObj):
947         (webkit_dom_test_obj_finalize):
948         (webkit_dom_test_obj_class_init):
949         (webkit_dom_test_obj_init):
950         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
951         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
952         (WebKit::core):
953         (WebKit::wrapTestOverloadedConstructors):
954         (webkit_dom_test_overloaded_constructors_finalize):
955         (webkit_dom_test_overloaded_constructors_class_init):
956         (webkit_dom_test_overloaded_constructors_init):
957         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
958         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
959         (WebKit::core):
960         (WebKit::wrapTestSerializedScriptValueInterface):
961         (webkit_dom_test_serialized_script_value_interface_finalize):
962         (webkit_dom_test_serialized_script_value_interface_class_init):
963         (webkit_dom_test_serialized_script_value_interface_init):
964         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
965
966 2012-12-04  Markus Heintz  <markusheintz@chromium.org>
967
968         Web Inspector: Viewport console warnings cleanup.
969         https://bugs.webkit.org/show_bug.cgi?id=102890
970
971         Reviewed by Jochen Eisinger.
972
973         Improve the console message text for a viewport console warning and
974         change the log level to warning.
975
976         No new tests added, as this change is covered by updates to existing
977         test expectations.
978
979         * dom/ViewportArguments.cpp:
980         (WebCore::viewportErrorMessageTemplate):
981             Improve the console message text for invalid values.
982         (WebCore::viewportErrorMessageLevel):
983             Upgraded the TruncatedViewportArgumentValueError and the
984             TargetDensityDpiUnsupported messages's MessageLeval to warning.
985         (WebCore::reportViewportWarning):
986             Adding only a comment for a FIXIT reminder.
987
988 2012-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
989
990         [GTK] Use a private struct and placement new syntax in GObject DOM bindings
991         https://bugs.webkit.org/show_bug.cgi?id=101074
992
993         Reviewed by Xan Lopez.
994
995         It allows to use RefPtr for the wrapped object and it simplifies
996         the code.
997
998         * bindings/scripts/CodeGeneratorGObject.pm:
999         (GenerateProperties):
1000         (GenerateHeader):
1001         (GenerateCFile):
1002         (GenerateEventTargetIface):
1003         (WriteData):
1004         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
1005         (_WebKitDOMFloat64ArrayPrivate):
1006         (WebKit::core):
1007         (WebKit::wrapFloat64Array):
1008         (webkit_dom_float64array_finalize):
1009         (webkit_dom_float64array_constructor):
1010         (webkit_dom_float64array_class_init):
1011         (webkit_dom_float64array_init):
1012         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
1013         (_WebKitDOMFloat64Array):
1014         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1015         (_WebKitDOMTestActiveDOMObjectPrivate):
1016         (WebKit::core):
1017         (WebKit::wrapTestActiveDOMObject):
1018         (webkit_dom_test_active_dom_object_finalize):
1019         (webkit_dom_test_active_dom_object_constructor):
1020         (webkit_dom_test_active_dom_object_class_init):
1021         (webkit_dom_test_active_dom_object_init):
1022         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
1023         (_WebKitDOMTestActiveDOMObject):
1024         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1025         (_WebKitDOMTestCallbackPrivate):
1026         (WebKit::core):
1027         (WebKit::wrapTestCallback):
1028         (webkit_dom_test_callback_finalize):
1029         (webkit_dom_test_callback_constructor):
1030         (webkit_dom_test_callback_class_init):
1031         (webkit_dom_test_callback_init):
1032         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1033         (_WebKitDOMTestCallback):
1034         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1035         (_WebKitDOMTestCustomNamedGetterPrivate):
1036         (WebKit::core):
1037         (WebKit::wrapTestCustomNamedGetter):
1038         (webkit_dom_test_custom_named_getter_finalize):
1039         (webkit_dom_test_custom_named_getter_constructor):
1040         (webkit_dom_test_custom_named_getter_class_init):
1041         (webkit_dom_test_custom_named_getter_init):
1042         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
1043         (_WebKitDOMTestCustomNamedGetter):
1044         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1045         (_WebKitDOMTestEventConstructorPrivate):
1046         (WebKit::core):
1047         (WebKit::wrapTestEventConstructor):
1048         (webkit_dom_test_event_constructor_finalize):
1049         (webkit_dom_test_event_constructor_constructor):
1050         (webkit_dom_test_event_constructor_class_init):
1051         (webkit_dom_test_event_constructor_init):
1052         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
1053         (_WebKitDOMTestEventConstructor):
1054         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1055         (_WebKitDOMTestEventTargetPrivate):
1056         (WebKit::core):
1057         (WebKit::wrapTestEventTarget):
1058         (webkit_dom_test_event_target_dispatch_event):
1059         (webkit_dom_test_event_target_add_event_listener):
1060         (webkit_dom_test_event_target_remove_event_listener):
1061         (webkit_dom_test_event_target_finalize):
1062         (webkit_dom_test_event_target_constructor):
1063         (webkit_dom_test_event_target_class_init):
1064         (webkit_dom_test_event_target_init):
1065         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
1066         (_WebKitDOMTestEventTarget):
1067         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
1068         (_WebKitDOMTestExceptionPrivate):
1069         (WebKit::core):
1070         (WebKit::wrapTestException):
1071         (webkit_dom_test_exception_finalize):
1072         (webkit_dom_test_exception_constructor):
1073         (webkit_dom_test_exception_class_init):
1074         (webkit_dom_test_exception_init):
1075         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
1076         (_WebKitDOMTestException):
1077         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1078         (_WebKitDOMTestInterfacePrivate):
1079         (WebKit::core):
1080         (WebKit::wrapTestInterface):
1081         (webkit_dom_test_interface_finalize):
1082         (webkit_dom_test_interface_constructor):
1083         (webkit_dom_test_interface_class_init):
1084         (webkit_dom_test_interface_init):
1085         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
1086         (_WebKitDOMTestInterface):
1087         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1088         (_WebKitDOMTestMediaQueryListListenerPrivate):
1089         (WebKit::core):
1090         (WebKit::wrapTestMediaQueryListListener):
1091         (webkit_dom_test_media_query_list_listener_finalize):
1092         (webkit_dom_test_media_query_list_listener_constructor):
1093         (webkit_dom_test_media_query_list_listener_class_init):
1094         (webkit_dom_test_media_query_list_listener_init):
1095         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
1096         (_WebKitDOMTestMediaQueryListListener):
1097         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1098         (_WebKitDOMTestNamedConstructorPrivate):
1099         (WebKit::core):
1100         (WebKit::wrapTestNamedConstructor):
1101         (webkit_dom_test_named_constructor_finalize):
1102         (webkit_dom_test_named_constructor_constructor):
1103         (webkit_dom_test_named_constructor_class_init):
1104         (webkit_dom_test_named_constructor_init):
1105         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
1106         (_WebKitDOMTestNamedConstructor):
1107         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1108         (_WebKitDOMTestNodePrivate):
1109         (WebKit::core):
1110         (WebKit::wrapTestNode):
1111         (webkit_dom_test_node_dispatch_event):
1112         (webkit_dom_test_node_add_event_listener):
1113         (webkit_dom_test_node_remove_event_listener):
1114         (webkit_dom_test_node_finalize):
1115         (webkit_dom_test_node_constructor):
1116         (webkit_dom_test_node_class_init):
1117         (webkit_dom_test_node_init):
1118         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
1119         (_WebKitDOMTestNode):
1120         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1121         (_WebKitDOMTestObjPrivate):
1122         (WebKit::core):
1123         (WebKit::wrapTestObj):
1124         (webkit_dom_test_obj_finalize):
1125         (webkit_dom_test_obj_constructor):
1126         (webkit_dom_test_obj_class_init):
1127         (webkit_dom_test_obj_init):
1128         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1129         (_WebKitDOMTestObj):
1130         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1131         (_WebKitDOMTestSerializedScriptValueInterfacePrivate):
1132         (WebKit::core):
1133         (WebKit::wrapTestSerializedScriptValueInterface):
1134         (webkit_dom_test_serialized_script_value_interface_finalize):
1135         (webkit_dom_test_serialized_script_value_interface_constructor):
1136         (webkit_dom_test_serialized_script_value_interface_class_init):
1137         (webkit_dom_test_serialized_script_value_interface_init):
1138         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
1139         (_WebKitDOMTestSerializedScriptValueInterface):
1140
1141 2012-12-04  David Grogan  <dgrogan@chromium.org>
1142
1143         IndexedDB: Make leveldb histogram entries more fine-grained
1144         https://bugs.webkit.org/show_bug.cgi?id=103688
1145
1146         Reviewed by Tony Chang.
1147
1148         Allow us better insight into which functions the IO errors originate
1149         from.
1150
1151         * Modules/indexeddb/IDBBackingStore.cpp:
1152         (WebCore::setUpMetadata):
1153         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
1154         (WebCore::IDBBackingStore::getObjectStores):
1155         (WebCore::IDBBackingStore::getRecord):
1156         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
1157         (WebCore::IDBBackingStore::keyExistsInObjectStore):
1158         (WebCore::IDBBackingStore::getIndexes):
1159         (WebCore::IDBBackingStore::findKeyInIndex):
1160         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
1161         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
1162         (WebCore::IndexKeyCursorImpl::loadCurrentRow):
1163         (WebCore::IndexCursorImpl::loadCurrentRow):
1164
1165 2012-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1166
1167         [GTK] Avoid unnecessary heap allocations during drag and drop operations
1168         https://bugs.webkit.org/show_bug.cgi?id=87938
1169
1170         Reviewed by Martin Robinson.
1171
1172         * platform/gtk/GtkDragAndDropHelper.cpp:
1173         (WebCore::GtkDragAndDropHelper::handleDragMotion): Return a
1174         pointer to the DataObjectGtk so that the caller can create the
1175         DragData object in the stack.
1176         (WebCore::GtkDragAndDropHelper::handleDragDataReceived): Ditto.
1177         (WebCore::GtkDragAndDropHelper::handleDragDrop): Ditto.
1178         * platform/gtk/GtkDragAndDropHelper.h:
1179
1180 2012-12-04  Alexander Pavlov  <apavlov@chromium.org>
1181
1182         Web Inspector: [Overrides] Add ability to override the page CSS media type
1183         https://bugs.webkit.org/show_bug.cgi?id=103752
1184
1185         Reviewed by Pavel Feldman.
1186
1187         This change emulates the CSS media types through the instrumentation of FrameView::mediaType().
1188         Even though it already checks the associated FrameLoaderClient::overrideMediaType(), instrumenting
1189         every single platform FrameLoaderClient implementation out there seems wrong.
1190
1191         Test: inspector/styles/media-emulation.html
1192
1193         * English.lproj/localizedStrings.js:
1194         * inspector/Inspector.json: Add Page.setEmulatedMedia().
1195         * inspector/InspectorInstrumentation.cpp:
1196         (WebCore::InspectorInstrumentation::applyEmulatedMediaImpl): Added.
1197         * inspector/InspectorInstrumentation.h:
1198         (WebCore::InspectorInstrumentation::applyEmulatedMedia): Added.
1199         * inspector/InspectorPageAgent.cpp:
1200         (WebCore::InspectorPageAgent::restore): Restores the media emulation state.
1201         (WebCore::InspectorPageAgent::disable): Resets the media emulation state.
1202         (WebCore::InspectorPageAgent::setEmulatedMedia): Added.
1203         (WebCore::InspectorPageAgent::applyEmulatedMedia): Applies the emulated CSS media if needed.
1204         * inspector/InspectorPageAgent.h:
1205         * inspector/front-end/CSSStyleModel.js: Add the list of media types.
1206         * inspector/front-end/OverridesView.js: Add the CSS media type override UI.
1207         (WebInspector.OverridesView):
1208         (WebInspector.OverridesView.prototype._createMediaEmulationElement): Builds the UI.
1209         (WebInspector.OverridesView.prototype._emulateMediaChanged): Handles the control value changes.
1210         * inspector/front-end/Settings.js: Add the "emulatedCSSMedia" setting.
1211         * page/FrameView.cpp:
1212         (WebCore::FrameView::mediaType):
1213           Uses InspectorInstrumentation::applyEmulatedMedia() to provide the emulated value.
1214
1215 2012-12-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1216
1217         [GTK] Simplify GObject DOM bindings code for handling properties
1218         https://bugs.webkit.org/show_bug.cgi?id=101072
1219
1220         Reviewed by Xan Lopez.
1221
1222         Do not override GObjectClass::set_property if the wrapped object
1223         doesn't have writable properties, and don't override
1224         GObjectClass::get_property if the wrapped object doesn't have
1225         properties at all. It reduces some GObject boilerplate in
1226         generated code for some objects.
1227
1228         * bindings/scripts/CodeGeneratorGObject.pm:
1229         (GenerateProperties):
1230         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
1231         (webkit_dom_float64array_class_init):
1232         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
1233         (webkit_dom_test_active_dom_object_class_init):
1234         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1235         (webkit_dom_test_callback_class_init):
1236         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
1237         (webkit_dom_test_custom_named_getter_class_init):
1238         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
1239         (webkit_dom_test_event_constructor_class_init):
1240         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
1241         (webkit_dom_test_event_target_class_init):
1242         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
1243         (webkit_dom_test_exception_class_init):
1244         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
1245         (webkit_dom_test_interface_class_init):
1246         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
1247         (webkit_dom_test_media_query_list_listener_class_init):
1248         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
1249         (webkit_dom_test_named_constructor_class_init):
1250         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
1251         (webkit_dom_test_node_class_init):
1252         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1253         (webkit_dom_test_obj_class_init):
1254         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1255         (webkit_dom_test_serialized_script_value_interface_class_init):
1256
1257 2012-12-04  Kentaro Hara  <haraken@chromium.org>
1258
1259         Unreviewed. Rebaselined run-bindings-tests.
1260
1261         * bindings/scripts/test/JS/JSTestNode.cpp:
1262         (WebCore::JSTestNode::visitChildren):
1263         (WebCore):
1264
1265 2012-12-03  Alexander Pavlov  <apavlov@chromium.org>
1266
1267         Web Inspector: [REGRESSION] [Styles] Rule disappears if edited selector does not affect selected node
1268         https://bugs.webkit.org/show_bug.cgi?id=103059
1269
1270         Reviewed by Pavel Feldman.
1271
1272         This change effectively turns WebInspector.cssModel.setRuleSelector() into a _userOperation
1273         (in terms of StylesSidebarPane), which finishes upon the _finishOperationAndMoveEditor() invocation.
1274
1275         * inspector/front-end/CSSStyleModel.js:
1276         (WebInspector.CSSRule): Fix selectorText now that r136370 has landed.
1277         * inspector/front-end/StylesSidebarPane.js:
1278         (WebInspector.StylePropertiesSection.prototype.update): Update the selector text from the model.
1279         (WebInspector.StylePropertiesSection.prototype._markSelectorMatches): Set the "selector" className regardless of the matched selectors presence.
1280         (WebInspector.StylePropertiesSection.prototype.successCallback): Make use of the _userOperation flag.
1281         (WebInspector.StylePropertiesSection.prototype.finishOperationAndMoveEditor): Delete the _userOperation flag.
1282         (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): Make use of the _userOperation flag.
1283         (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCommitted): Mark selector matches.
1284         (WebInspector.BlankStylePropertiesSection.prototype.editingSelectorCancelled): Delete the _userOperation flag.
1285
1286 2012-12-04  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1287
1288         [EFL][WK2][AC] USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.
1289         https://bugs.webkit.org/show_bug.cgi?id=103710.
1290
1291         Reviewed by Kenneth Rohde Christiansen.
1292
1293         When using GLX back-end we are dependent on GLX support, Xcomposite and Xrender extensions.
1294         In this case, GraphicsSurface usage depends on Xcomposite and Xrender extensions. 
1295         USE_GRAPHICS_SURFACE should be enabled only if Xcomposite and Xrender extensions are found.
1296
1297         * platform/graphics/opengl/GLPlatformSurface.cpp:
1298         (WebCore::GLPlatformSurface::createTransportSurface):
1299         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1300         (WebCore):
1301         * platform/graphics/surfaces/glx/GLXSurface.h:
1302         (WebCore::SharedX11Resources::createConfig):
1303         (SharedX11Resources):
1304
1305 2012-12-04  Michael Pruett  <michael@68k.org>
1306
1307         [JSC] Generate visitChildren() for uncustomized EventTarget interfaces
1308         https://bugs.webkit.org/show_bug.cgi?id=103908
1309
1310         Reviewed by Geoffrey Garen.
1311
1312         CodeGeneratorJS.pm should automatically generate visitChildren()
1313         for EventTarget interfaces without custom mark functions even if
1314         those interfaces have no functions or cached attributes.
1315
1316         This change is needed for IDBOpenDBRequest and IDBVersionChangeRequest.
1317
1318         No new tests. Covered by existing tests.
1319
1320         * bindings/scripts/CodeGeneratorJS.pm:
1321         (GenerateImplementation):
1322
1323 2012-12-04  Kentaro Hara  <haraken@chromium.org>
1324
1325         Change ChildNodeInsertionNotifier::m_postInsertionsNotificationTargets from a Vector to an OwnPtr
1326         https://bugs.webkit.org/show_bug.cgi?id=103868
1327
1328         Reviewed by Darin Adler.
1329
1330         ChildNodeInsertionNotifier::m_postInsertionsNotificationTargets is
1331         used for HTMLFrameElement and HTMLBodyElement only, which would be
1332         a cold path. We can change it from a Vector to an OwnPtr<Vector>
1333         so that ChildNodeInsertionNotifier can be allocated faster. This patch
1334         optimizes Dromaeo/dom-modify by 1.4%.
1335
1336         [Dromaeo/dom-modify in Chromium/Linux]
1337         Before: 4532 runs/sec, 4545 runs/sec, 4530 runs/sec, 4536 runs/sec
1338         After:  4595 runs/sec, 4606 runs/sec, 4597 runs/sec, 4602 runs/sec
1339
1340         No tests. No change in behavior.
1341
1342         * dom/ContainerNodeAlgorithms.h:
1343         (ChildNodeInsertionNotifier):
1344         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
1345         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
1346         (WebCore::ChildNodeInsertionNotifier::notify):
1347
1348 2012-12-03  Rafael Weinstein  <rafaelw@chromium.org>
1349
1350         Unreviewed build fix after r136467
1351
1352         The template element patch added asserts in parserAppendChild and parserInsertBefore which should be valid, but DOMImplementation::createDocument() calls parserAppendChild with docType without regard to its owner. This patch removes the assert and adds a FIXME.
1353
1354         * dom/ContainerNode.cpp:
1355         (WebCore::ContainerNode::parserInsertBefore):
1356         (WebCore::ContainerNode::parserAppendChild):
1357
1358 2012-12-03  Kentaro Hara  <haraken@chromium.org>
1359
1360         [V8] Enter an Isolate before initializing PerIsolateData
1361         https://bugs.webkit.org/show_bug.cgi?id=103949
1362
1363         Reviewed by Adam Barth.
1364
1365         Currently we initialize PerIsolateData before entering an Isolate,
1366         which prevents us from using an Isolate in the PerIsolateData
1367         constructor. We should enter an Isolate first and then initialize
1368         PerIsolateData.
1369
1370         No tests. No change in behavior.
1371
1372         * bindings/v8/WorkerScriptController.cpp:
1373         (WebCore::WorkerScriptController::WorkerScriptController):
1374
1375 2012-12-03  Sergio Villar Senin  <svillar@igalia.com>
1376
1377         [GTK] Add WebKitDOMShadowRoot.h to the list of public API headers after r135693
1378         https://bugs.webkit.org/show_bug.cgi?id=103909
1379
1380         Reviewed by Martin Robinson.
1381
1382         WebKitDOMShadowRoot was added in r135693. As it is added to
1383         webkitdom.h we have to export the include file, otherwise clients
1384         will fail to build due to the missing file.
1385
1386         * bindings/gobject/GNUmakefile.am:
1387
1388 2012-12-03  Joshua Bell  <jsbell@chromium.org>
1389
1390         IndexedDB: Correct database version after aborted upgrade
1391         https://bugs.webkit.org/show_bug.cgi?id=103763
1392
1393         Reviewed by Tony Chang.
1394
1395         After an aborted "versionchange" transaction, the IDBDatabase would fetch a fresh snapshot
1396         of the metadata from the back end. If the back end had already started a new "versionchange"
1397         transaction the snapshot would be bogus. Instead, save a copy of the IDBDatabase's metadata
1398         and roll back to that, as is done for IDBObjectStore.
1399
1400         Tests: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html
1401                storage/indexeddb/mozilla/versionchange-abort.html
1402                storage/indexeddb/unblocked-version-changes.html
1403
1404         * Modules/indexeddb/IDBDatabase.cpp:
1405         (WebCore::IDBDatabase::IDBDatabase):
1406         (WebCore::IDBDatabase::transactionCreated):
1407         * Modules/indexeddb/IDBDatabase.h:
1408         (WebCore::IDBDatabase::setMetadata): Let IDBOpenDBRequest and IDBTransaction tinker.
1409         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1410         (WebCore::IDBOpenDBRequest::onUpgradeNeeded): Fetch new and compute old metadata.
1411         (WebCore::IDBOpenDBRequest::onSuccess): Fetch new metadata, in case upgrade changed it.
1412         * Modules/indexeddb/IDBTransaction.cpp:
1413         (WebCore::IDBTransaction::create): Stash the old metadata, in case of rollback.
1414         (WebCore::IDBTransaction::IDBTransaction):
1415         (WebCore::IDBTransaction::onAbort): Revert the database as well as the stores.
1416         * Modules/indexeddb/IDBTransaction.h:
1417         (IDBTransaction):
1418
1419 2012-12-03  Rafael Weinstein  <rafaelw@chromium.org>
1420
1421         Implement HTMLTemplateElement
1422         https://bugs.webkit.org/show_bug.cgi?id=86031
1423
1424         Reviewed by Adam Barth.
1425
1426         Initial implementation. This patch includes the parser changes, new IDL and element implementation for <template>.
1427
1428         Spec: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
1429
1430         Tests: fast/dom/HTMLTemplateElement/cloneNode.html
1431                fast/dom/HTMLTemplateElement/inertContents.html
1432                fast/dom/HTMLTemplateElement/innerHTML.html
1433                fast/dom/HTMLTemplateElement/ownerDocument.html
1434                html5lib/run-template.html
1435
1436         * WebCore.gypi:
1437         * css/html.css:
1438         (template):
1439         * dom/Document.cpp:
1440         (WebCore):
1441         (WebCore::Document::templateContentsOwnerDocument):
1442         * dom/Document.h:
1443         (Document):
1444         * editing/MarkupAccumulator.cpp:
1445         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
1446         * html/HTMLElement.h:
1447         (HTMLElement):
1448         * html/HTMLElementsAllInOne.cpp:
1449         * html/HTMLTagNames.in:
1450         * html/HTMLTemplateElement.cpp: Added.
1451         (WebCore):
1452         (WebCore::HTMLTemplateElement::HTMLTemplateElement):
1453         (WebCore::HTMLTemplateElement::setInnerHTML):
1454         (WebCore::HTMLTemplateElement::~HTMLTemplateElement):
1455         (WebCore::HTMLTemplateElement::create):
1456         (WebCore::HTMLTemplateElement::content):
1457         (WebCore::HTMLTemplateElement::setContent):
1458         (WebCore::toHTMLTemplateElement):
1459         * html/HTMLTemplateElement.h: Added.
1460         (WebCore):
1461         (HTMLTemplateElement):
1462         (WebCore::toHTMLTemplateElement):
1463         * html/HTMLTemplateElement.idl: Added.
1464         * html/parser/HTMLConstructionSite.cpp:
1465         (WebCore::executeTask):
1466         (WebCore::HTMLConstructionSite::insertComment):
1467         (WebCore::HTMLConstructionSite::insertTextNode):
1468         (WebCore::HTMLConstructionSite::createElement):
1469         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
1470         (WebCore):
1471         (WebCore::HTMLConstructionSite::createHTMLElement):
1472         (WebCore::HTMLConstructionSite::findFosterSite):
1473         * html/parser/HTMLConstructionSite.h:
1474         (HTMLConstructionSite):
1475         * html/parser/HTMLElementStack.cpp:
1476         (WebCore):
1477         (WebCore::HTMLElementStack::hasTemplateInHTMLScope):
1478         * html/parser/HTMLElementStack.h:
1479         (HTMLElementStack):
1480         * html/parser/HTMLTreeBuilder.cpp:
1481         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
1482         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1483         (WebCore):
1484         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
1485         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
1486         (WebCore::HTMLTreeBuilder::processStartTag):
1487         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
1488         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
1489         (WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
1490         (WebCore::HTMLTreeBuilder::processEndTagForInRow):
1491         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
1492         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1493         (WebCore::HTMLTreeBuilder::processTrEndTagForInRow):
1494         (WebCore::HTMLTreeBuilder::processTableEndTagForInTable):
1495         (WebCore::HTMLTreeBuilder::processEndTag):
1496         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
1497         (WebCore::HTMLTreeBuilder::processEndOfFile):
1498         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
1499         * html/parser/HTMLTreeBuilder.h:
1500         (HTMLTreeBuilder):
1501         (WebCore::HTMLTreeBuilder::isParsingTemplateContents):
1502         (WebCore::HTMLTreeBuilder::isParsingFragmentOrTemplateContents):
1503         * page/DOMWindow.idl:
1504
1505 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
1506
1507         Unreviewed, rolling out r136460.
1508         http://trac.webkit.org/changeset/136460
1509         https://bugs.webkit.org/show_bug.cgi?id=103958
1510
1511         This patch caused compile error when building DumpRenderTree
1512         (Requested by tasak on #webkit).
1513
1514         * WebCore.gyp/WebCore.gyp:
1515         * WebCore.gypi:
1516         * platform/chromium/PlatformThemeChromiumLinux.cpp: Added.
1517         (WebCore):
1518         (WebCore::PlatformThemeChromiumLinux::setScrollbarColors):
1519         (WebCore::clamp):
1520         (WebCore::PlatformThemeChromiumLinux::saturateAndBrighten):
1521         (WebCore::PlatformThemeChromiumLinux::outlineColor):
1522         (WebCore::PlatformThemeChromiumLinux::paintArrowButton):
1523         * platform/chromium/PlatformThemeChromiumLinux.h: Added.
1524         (WebCore):
1525         (PlatformThemeChromiumLinux):
1526         (WebCore::PlatformThemeChromiumLinux::thumbInactiveColor):
1527         (WebCore::PlatformThemeChromiumLinux::thumbActiveColor):
1528         (WebCore::PlatformThemeChromiumLinux::trackColor):
1529         (WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux):
1530         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Added.
1531         (WebCore):
1532         (WebCore::ScrollbarTheme::nativeTheme):
1533         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
1534         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
1535         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
1536         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
1537         (WebCore::ScrollbarThemeChromiumLinux::shouldCenterOnThumb):
1538         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
1539         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
1540         * platform/chromium/ScrollbarThemeChromiumLinux.h: Added.
1541         (ScrollbarThemeChromiumLinux):
1542         * rendering/RenderThemeChromiumAndroid.cpp:
1543         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet):
1544         * rendering/RenderThemeChromiumAndroid.h:
1545         * rendering/RenderThemeChromiumLinux.cpp: Added.
1546         (WebCore):
1547         (WebCore::getWebThemeState):
1548         (WebCore::RenderThemeChromiumLinux::create):
1549         (WebCore::RenderTheme::themeForPage):
1550         (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
1551         (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
1552         (WebCore::RenderThemeChromiumLinux::systemColor):
1553         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
1554         (WebCore::RenderThemeChromiumLinux::controlSupportsTints):
1555         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionBackgroundColor):
1556         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionForegroundColor):
1557         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionBackgroundColor):
1558         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionForegroundColor):
1559         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionBackgroundColor):
1560         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionBackgroundColor):
1561         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionForegroundColor):
1562         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionForegroundColor):
1563         (WebCore::RenderThemeChromiumLinux::sliderTickSize):
1564         (WebCore::RenderThemeChromiumLinux::sliderTickOffsetFromTrackCenter):
1565         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
1566         (WebCore::RenderThemeChromiumLinux::supportsControlTints):
1567         (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
1568         (WebCore::RenderThemeChromiumLinux::caretBlinkIntervalInternal):
1569         (WebCore::RenderThemeChromiumLinux::setSelectionColors):
1570         (WebCore::RenderThemeChromiumLinux::paintCheckbox):
1571         (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
1572         (WebCore::RenderThemeChromiumLinux::paintRadio):
1573         (WebCore::RenderThemeChromiumLinux::setRadioSize):
1574         (WebCore::RenderThemeChromiumLinux::paintButton):
1575         (WebCore::RenderThemeChromiumLinux::paintTextField):
1576         (WebCore::RenderThemeChromiumLinux::paintMenuList):
1577         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
1578         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
1579         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
1580         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
1581         (WebCore::RenderThemeChromiumLinux::paintProgressBar):
1582         (WebCore::RenderThemeChromiumLinux::shouldOpenPickerWithF4Key):
1583         * rendering/RenderThemeChromiumLinux.h: Added.
1584         (WebCore):
1585         (RenderThemeChromiumLinux):
1586
1587 2012-12-03  Julien Chaffraix  <jchaffraix@webkit.org>
1588
1589         [CSS Grid Layout] Support paddings and margins on grid items
1590         https://bugs.webkit.org/show_bug.cgi?id=103677
1591
1592         Reviewed by Tony Chang.
1593
1594         After bug 102968, we properly resolve grid items' width and height against the
1595         grid areas' sizes. However we didn't check for paddings and margins, which is
1596         what this change fixes..
1597
1598         Test: fast/css-grid-layout/percent-padding-margin-resolution-grid-item.html
1599
1600         * rendering/RenderBox.cpp:
1601         (WebCore::RenderBox::computeLogicalWidthInRegion):
1602         Don't stretch the end margin to match the containing block's extent.
1603         The fix is similar to what was done for flex-box in bug 65887.
1604
1605         * rendering/RenderBoxModelObject.cpp:
1606         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
1607         Added a comment about not using containingBlockLogicalWidthForContent.
1608
1609         (WebCore::RenderBoxModelObject::computedCSSPaddingTop):
1610         (WebCore::RenderBoxModelObject::computedCSSPaddingBottom):
1611         (WebCore::RenderBoxModelObject::computedCSSPaddingLeft):
1612         (WebCore::RenderBoxModelObject::computedCSSPaddingRight):
1613         (WebCore::RenderBoxModelObject::computedCSSPaddingBefore):
1614         (WebCore::RenderBoxModelObject::computedCSSPaddingAfter):
1615         (WebCore::RenderBoxModelObject::computedCSSPaddingStart):
1616         (WebCore::RenderBoxModelObject::computedCSSPaddingEnd):
1617         Updated these functions to use containingBlockLogicalWidthForContent.
1618
1619         * rendering/RenderGrid.h:
1620         * rendering/RenderObject.h:
1621         (WebCore::RenderObject::isRenderGrid):
1622         Added isRenderGrid.
1623
1624 2012-12-03  Scott Violet  <sky@chromium.org>
1625
1626         [chromium] Remove linux theme related files and switch to default
1627         https://bugs.webkit.org/show_bug.cgi?id=103897
1628
1629         Reviewed by Darin Fisher.
1630
1631         linux theme related files are now named default. This removes
1632         linux theme files, updates build files and removes ifdefs.
1633
1634         Code cleanup, no new tests.
1635
1636         * WebCore.gyp/WebCore.gyp: Update build rules
1637         * WebCore.gypi: Update build rules
1638         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
1639         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
1640         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
1641         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
1642         * rendering/RenderThemeChromiumAndroid.h: Change superclass
1643         * rendering/RenderThemeChromiumAndroid.cpp: Change call to superclass
1644         * rendering/RenderThemeChromiumLinux.cpp: Removed.
1645         * rendering/RenderThemeChromiumLinux.h: Removed.
1646
1647 2012-12-03  Pierre Rossi  <pierre.rossi@digia.com>
1648
1649         [Qt] Unreviewed build fix after r136410
1650
1651         When building without libjpeg, take JPEGImageDecoder's header out, since it now includes libjpeg.h.
1652
1653         * Target.pri: conditionally add JPEGImageDecoder.h to HEADERS
1654         * platform/image-decoders/ImageDecoder.cpp: guard JPEGImageDecoder.h's include
1655
1656 2012-12-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1657
1658         [EFL][Qt][WK2] Fixed position elements are not always fixed
1659         https://bugs.webkit.org/show_bug.cgi?id=103452
1660
1661         Reviewed by Simon Fraser.
1662
1663         The code figuring out whether fixed position layers are inside
1664         the visible viewport, assumes that the visible viewport is always
1665         the size of the layout viewport. This assumption doesn't hold with
1666         how the Qt and EFL tiled backing store and coordinated graphics
1667         works, so instead using the visibleContentsRect(), which provides
1668         the right values in all cases.
1669
1670         * rendering/RenderLayerCompositor.cpp:
1671         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1672
1673             Use visibleContentsRect instead of scrollOffsetForFixedPosition().
1674
1675             scrollOffsetForFixedPosition() is needed sometimes in the Mac code
1676             because visibleContentRect() will return negative offsets when you
1677             are in the rubber-band phase of a scroll on the Mac.
1678
1679             However that is not an issue here.
1680
1681 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
1682
1683         Unreviewed, rolling out r135271.
1684         http://trac.webkit.org/changeset/135271
1685         https://bugs.webkit.org/show_bug.cgi?id=103940
1686
1687         Some user stylesheet API clients broken (Requested by anttik
1688         on #webkit).
1689
1690         * css/StyleResolver.cpp:
1691         (WebCore::StyleResolver::StyleResolver):
1692         (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
1693         (WebCore::collectCSSOMWrappers):
1694         * css/StyleResolver.h:
1695         (StyleResolver):
1696         * dom/Document.cpp:
1697         (WebCore::Document::setCompatibilityMode):
1698         * dom/DocumentStyleSheetCollection.cpp:
1699         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
1700         (WebCore::DocumentStyleSheetCollection::pageUserSheet):
1701         (WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
1702         (WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
1703         (WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
1704         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1705         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
1706         * dom/DocumentStyleSheetCollection.h:
1707         (DocumentStyleSheetCollection):
1708         (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
1709         * page/Page.cpp:
1710         (WebCore::Page::userStyleSheetLocationChanged):
1711
1712 2012-11-30  Andrey Kosyakov  <caseq@chromium.org>
1713
1714         Web Inspector: make it possible to fliter out messages from console.{time,timeEnd}()
1715         https://bugs.webkit.org/show_bug.cgi?id=103781
1716
1717         Reviewed by Yury Semikhatsky.
1718
1719         - make console messages produced by console.timeEnd() TimingMessageType & DebugMessageLevel;
1720         - add console filter for Debug messages;
1721
1722         * inspector/ConsoleMessage.cpp:
1723         (WebCore::messageTypeValue):
1724         * inspector/Inspector.json:
1725         * inspector/InspectorConsoleAgent.cpp:
1726         (WebCore::InspectorConsoleAgent::stopTiming):
1727         * inspector/front-end/ConsoleMessage.js:
1728         (WebInspector.ConsoleMessageImpl.prototype.toMessageElement):
1729         * inspector/front-end/ConsoleView.js:
1730         (WebInspector.ConsoleView.prototype.):
1731         (WebInspector.ConsoleView.prototype.filter):
1732         * inspector/front-end/inspector.css:
1733         (.console-warning-level, .console-error-level, .console-log-level, .console-debug-level):
1734         (.filter-all .console-debug-level, .filter-debug .console-debug-level):
1735         (.filter-all .console-debug-level.repeated-message, .filter-debug .console-debug-level.repeated-message):
1736         * page/ConsoleTypes.h:
1737
1738 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
1739
1740         Unreviewed, rolling out r136444.
1741         http://trac.webkit.org/changeset/136444
1742         https://bugs.webkit.org/show_bug.cgi?id=103938
1743
1744         broke chromium build (Requested by zhenyao_wfh on #webkit).
1745
1746         * Target.pri:
1747         * platform/image-decoders/ImageDecoder.cpp:
1748
1749 2012-12-03  Pierre Rossi  <pierre.rossi@digia.com>
1750
1751         [Qt] Unreviewed build fix after r136410
1752
1753         When building without libjpeg, take JPEGImageDecoder's header out, since it now includes libjpeg.h.
1754
1755         * Target.pri: conditionally add JPEGImageDecoder.h to HEADERS
1756         * platform/image-decoders/ImageDecoder.cpp: guard JPEGImageDecoder.h's include
1757
1758 2012-11-30  James Simonsen  <simonjam@chromium.org>
1759
1760         [Resource Timing] Record and report initiator
1761         https://bugs.webkit.org/show_bug.cgi?id=103777
1762
1763         Reviewed by Nate Chapin.
1764
1765         This will start populating the Resource Timing buffer with entries. The initiator will be
1766         recorded for each CachedResourceLoader. This should match the next update of the spec.
1767
1768         Tests: http/tests/w3c/webperf/submission/resource-timing
1769
1770         * css/CSSFontSelector.cpp:
1771         (WebCore::CSSFontSelector::beginLoadTimerFired):
1772         * loader/ResourceLoadNotifier.cpp: Always record timing information if ENABLE(RESOURCE_TIMING).
1773         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
1774         * loader/SubresourceLoader.cpp:
1775         (WebCore::SubresourceLoader::releaseResources): Report the actual resource that called loadDone().
1776         * loader/cache/CachedResourceLoader.cpp:
1777         (WebCore::CachedResourceLoader::loadResource): Record the initiator.
1778         (WebCore::CachedResourceLoader::loadDone): Record the entry in Resource Timing.
1779         * loader/cache/CachedResourceLoader.h:
1780         (CachedResourceLoader):
1781         (InitiatorInfo):
1782
1783 2012-12-03  Florin Malita  <fmalita@chromium.org>
1784
1785         [Skia] Deferred SkCanvas save()
1786         https://bugs.webkit.org/show_bug.cgi?id=102272
1787
1788         Reviewed by Stephen White.
1789
1790         Implement a lazy save() strategy: instead of delegating to the canvas upfront, defer and
1791         only commit when a clip/matrix mutation is observed.
1792
1793         The patch yields a 1-20% SkCanvas save/restore reduction for heavy pages, with much larger
1794         gains observed for deeply nested SVG content.
1795
1796         No new tests: no behaviour changes, coverage provided by existing tests.
1797
1798         * platform/graphics/skia/GraphicsContextSkia.cpp:
1799         (WebCore::GraphicsContext::canvasClip):
1800         * platform/graphics/skia/PlatformContextSkia.cpp:
1801         (WebCore):
1802         (WebCore::PlatformContextSkia::DeferredSaveState::DeferredSaveState):
1803         (PlatformContextSkia::DeferredSaveState):
1804         (WebCore::PlatformContextSkia::PlatformContextSkia):
1805         (WebCore::PlatformContextSkia::save):
1806         (WebCore::PlatformContextSkia::saveLayer):
1807         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
1808         (WebCore::PlatformContextSkia::restore):
1809         (WebCore::PlatformContextSkia::applyClipFromImage):
1810         * platform/graphics/skia/PlatformContextSkia.h:
1811         (PlatformContextSkia):
1812         (WebCore::PlatformContextSkia::realizeSave):
1813         (WebCore):
1814         (WebCore::PlatformContextSkia::canvas):
1815         (WebCore::PlatformContextSkia::clipPath):
1816         (WebCore::PlatformContextSkia::clipRect):
1817         (WebCore::PlatformContextSkia::setMatrix):
1818         (WebCore::PlatformContextSkia::concat):
1819         (WebCore::PlatformContextSkia::rotate):
1820         (WebCore::PlatformContextSkia::scale):
1821         (WebCore::PlatformContextSkia::translate):
1822
1823 2012-12-03  Simon Fraser  <simon.fraser@apple.com>
1824
1825         When animating mask-postion on a composited layer, element renders incorrectly
1826         https://bugs.webkit.org/show_bug.cgi?id=103700
1827
1828         Reviewed by Tim Horton.
1829
1830         When a composited layer has a mask, we clipped the layer bounds to the
1831         size of the mask. This caused problems when animating the mask origin,
1832         which is considered a 'repaint' style change and so should not require
1833         layout or compositing geometry changes.
1834         
1835         Fix by ignoring the mask when computing the bounds of the compositing
1836         layer.
1837
1838         Test: compositing/masks/mask-layer-size.html
1839
1840         * rendering/RenderLayer.cpp:
1841         (WebCore::RenderLayer::localBoundingBox):
1842         (WebCore::RenderLayer::calculateLayerBounds):
1843         * rendering/RenderLayer.h:
1844         (RenderLayer):
1845         * rendering/RenderLayerCompositor.cpp:
1846         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
1847
1848 2012-12-03  Xan Lopez  <xan@igalia.com>
1849
1850         [CSS Grid Layout] Support <percentage> and viewport-relative breadth sizes
1851         https://bugs.webkit.org/show_bug.cgi?id=103335
1852
1853         Reviewed by Julien Chaffraix.
1854
1855         Test: fast/css-grid-layout/breadth-size-resolution-grid.html
1856
1857         * css/CSSComputedStyleDeclaration.cpp:
1858         (WebCore::valueForGridTrackBreadth): Support the new types.
1859         (WebCore::valueForGridTrackMinMax): Modify the call to previous
1860         method, since the signature has changed.
1861         (WebCore::valueForGridTrackGroup): Ditto.
1862         (WebCore::valueForGridTrackList): Ditto.
1863         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Ditto.
1864         * rendering/RenderGrid.cpp:
1865         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks): Suport
1866         percent and viewport relative types, calc() will be supported in a
1867         follow up (see bug #103761)
1868
1869 2012-12-03  Peter Rybin  <prybin@chromium.org>
1870
1871         Web Inspector: make ASSERTION FAILED: foundPropertiesCount == object->size() more useful
1872         https://bugs.webkit.org/show_bug.cgi?id=103254
1873
1874         Reviewed by Pavel Feldman.
1875
1876         Assert code generation is slightly changed so that it dumped JSON object text before crashing.
1877
1878         * inspector/CodeGeneratorInspector.py:
1879
1880 2012-12-03  Max Vujovic  <mvujovic@adobe.com>
1881
1882         [CSS Shaders] Do not clamp indirect array indices during CSS Shaders ANGLE validation pass
1883         https://bugs.webkit.org/show_bug.cgi?id=102731
1884
1885         Reviewed by Dean Jackson.
1886
1887         Before this patch, we validated all shaders with the compile flag
1888         SH_CLAMP_INDIRECT_ARRAY_BOUNDS in ANGLEWebKitBridge. This would insert a GLSL function
1889         "webgl_int_clamp" in validated CSS shaders. However, when validated CSS shaders would pass
1890         through ANGLE again at the GC3D level, ANGLE would reject them because they would contain
1891         the "webgl_" restricted prefix.
1892
1893         Now, we only pass the compile flag SH_CLAMP_INDIRECT_ARRAY_BOUNDS at the GC3D level.
1894
1895         Test: css3/filters/custom/custom-filter-array-uniform-indirect-index.html
1896
1897         * platform/graphics/ANGLEWebKitBridge.cpp:
1898         (WebCore::ANGLEWebKitBridge::compileShaderSource):
1899             Remove the SH_CLAMP_INDIRECT_ARRAY_BOUNDS compile flag.
1900         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
1901         (WebCore::CustomFilterValidatedProgram::compiledProgram):
1902             Add an assert that validated programs compile at the GC3D or platform level to help us
1903             catch validation and rewriting issues.
1904         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1905         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
1906             Pass the SH_CLAMP_INDIRECT_ARRAY_BOUNDS to compileShaderSource.
1907
1908 2012-12-03  Eugene Klyuchnikov  <eustas@chromium.org>
1909
1910         Web Inspector: Make main-thread monitoring go through InspectorController
1911         https://bugs.webkit.org/show_bug.cgi?id=103550
1912
1913         Reviewed by Pavel Feldman.
1914
1915         InspectorInstrumentation was a wrong path.
1916
1917         * inspector/InspectorClient.h: Remove start/stop methods.
1918         * inspector/InspectorController.cpp:
1919         Dispatch main thread activity notifications.
1920         * inspector/InspectorController.h: Ditto.
1921         * inspector/InspectorInstrumentation.cpp: Remove dispatchng.
1922         * inspector/InspectorInstrumentation.h: Ditto.
1923         * inspector/InspectorTimelineAgent.cpp:
1924         Do not subscribe for notifications explicitly.
1925
1926 2012-12-03  Philip Rogers  <pdr@google.com>
1927
1928         Invalidate SVG width on width attribute changes.
1929         https://bugs.webkit.org/show_bug.cgi?id=103304
1930
1931         Reviewed by Dirk Schulze.
1932
1933         An inline SVG element's replaced width can depend on both attributes and style properties.
1934         After r105513, we invalidated this width on style changes but not attribute changes. With
1935         this patch we invalidate the replaced width on width attribute changes too. Note that height
1936         is handled differently for replaced elements so only the width attribute needs this handling
1937         (the added test covers this too).
1938
1939         Test: svg/custom/root-size-attribute-changes.html
1940
1941         * svg/SVGSVGElement.cpp:
1942         (WebCore::SVGSVGElement::svgAttributeChanged):
1943
1944 2012-12-03  Alec Flett  <alecflett@chromium.org>
1945
1946         IndexedDB: remove IDBDatabaseBackendInterface::transaction()
1947         https://bugs.webkit.org/show_bug.cgi?id=102733
1948
1949         Reviewed by Darin Fisher.
1950
1951         Part 3 of a refactor, remove the old transaction() method.
1952
1953         No new tests as this is just post-refactor cleanup.
1954
1955         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1956         (IDBDatabaseBackendInterface):
1957
1958 2012-12-03  Andrey Adaikin  <aandrey@chromium.org>
1959
1960         Web Inspector: [Canvas] show replay screenshot of the last call's canvas
1961         https://bugs.webkit.org/show_bug.cgi?id=103739
1962
1963         Reviewed by Pavel Feldman.
1964
1965         When many canvases are being instrumented we'll want to show replay screenshots for each canvas.
1966         Meanwhile, show the screenshot of the last-touched canvas during the current replay.
1967
1968         * inspector/InjectedScriptCanvasModuleSource.js:
1969         (.):
1970
1971 2012-12-03  Joshua Bell  <jsbell@chromium.org>
1972
1973         IndexedDB: Rename exception enum members from UGLY_ERR to PrettyError
1974         https://bugs.webkit.org/show_bug.cgi?id=103759
1975
1976         Reviewed by Darin Fisher.
1977
1978         Now that IDBDatabaseException isn't exposed to script with constants, the exception types
1979         can be renamed to match the much friendlier names used in newer iterations of the spec. Also
1980         remove the legacy/unused types.
1981
1982         No new tests, just constant renames.
1983
1984         * Modules/indexeddb/IDBCursor.cpp:
1985         (WebCore::IDBCursor::update):
1986         (WebCore::IDBCursor::advance):
1987         (WebCore::IDBCursor::continueFunction):
1988         (WebCore::IDBCursor::deleteFunction):
1989         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1990         (WebCore::IDBCursorBackendImpl::continueFunction):
1991         (WebCore::IDBCursorBackendImpl::advance):
1992         (WebCore::IDBCursorBackendImpl::prefetchContinue):
1993         * Modules/indexeddb/IDBDatabase.cpp:
1994         (WebCore::IDBDatabase::createObjectStore):
1995         (WebCore::IDBDatabase::deleteObjectStore):
1996         (WebCore::IDBDatabase::transaction):
1997         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1998         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1999         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
2000         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
2001         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
2002         (WebCore::IDBDatabaseBackendImpl::openConnection):
2003         (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
2004         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
2005         (WebCore::IDBDatabaseBackendImpl::close):
2006         * Modules/indexeddb/IDBDatabaseException.cpp: Tidying and renaming.
2007         (WebCore):
2008         (WebCore::getErrorEntry):
2009         * Modules/indexeddb/IDBDatabaseException.h:
2010         * Modules/indexeddb/IDBFactory.cpp:
2011         (WebCore::IDBFactory::cmp):
2012         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2013         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
2014         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
2015         (WebCore::IDBFactoryBackendImpl::open):
2016         * Modules/indexeddb/IDBIndex.cpp:
2017         (WebCore::IDBIndex::openCursor):
2018         (WebCore::IDBIndex::count):
2019         (WebCore::IDBIndex::openKeyCursor):
2020         (WebCore::IDBIndex::get):
2021         (WebCore::IDBIndex::getKey):
2022         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
2023         (WebCore::IDBIndexBackendImpl::openCursor):
2024         (WebCore::IDBIndexBackendImpl::openKeyCursor):
2025         (WebCore::IDBIndexBackendImpl::count):
2026         (WebCore::IDBIndexBackendImpl::get):
2027         (WebCore::IDBIndexBackendImpl::getKey):
2028         * Modules/indexeddb/IDBKeyRange.cpp:
2029         (WebCore::IDBKeyRange::only):
2030         (WebCore::IDBKeyRange::lowerBound):
2031         (WebCore::IDBKeyRange::upperBound):
2032         (WebCore::IDBKeyRange::bound):
2033         * Modules/indexeddb/IDBObjectStore.cpp:
2034         (WebCore::IDBObjectStore::get):
2035         (WebCore::IDBObjectStore::put):
2036         (WebCore::IDBObjectStore::deleteFunction):
2037         (WebCore::IDBObjectStore::clear):
2038         (WebCore):
2039         (WebCore::IDBObjectStore::createIndex):
2040         (WebCore::IDBObjectStore::index):
2041         (WebCore::IDBObjectStore::deleteIndex):
2042         (WebCore::IDBObjectStore::openCursor):
2043         (WebCore::IDBObjectStore::count):
2044         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2045         (WebCore::IDBObjectStoreBackendImpl::get):
2046         (WebCore::IDBObjectStoreBackendImpl::put):
2047         (WebCore):
2048         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
2049         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
2050         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
2051         (WebCore::IDBObjectStoreBackendImpl::clear):
2052         (WebCore::IDBObjectStoreBackendImpl::createIndex):
2053         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
2054         (WebCore::IDBObjectStoreBackendImpl::openCursor):
2055         (WebCore::IDBObjectStoreBackendImpl::count):
2056         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2057         (WebCore::IDBOpenDBRequest::dispatchEvent):
2058         * Modules/indexeddb/IDBRequest.cpp:
2059         (WebCore::IDBRequest::result):
2060         (WebCore::IDBRequest::error):
2061         (WebCore::IDBRequest::errorCode):
2062         (WebCore::IDBRequest::webkitErrorMessage):
2063         (WebCore::IDBRequest::abort):
2064         (WebCore::IDBRequest::dispatchEvent):
2065         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
2066         * Modules/indexeddb/IDBTransaction.cpp:
2067         (WebCore::IDBTransaction::objectStore):
2068         (WebCore::IDBTransaction::abort):
2069         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2070         (WebCore::IDBTransactionBackendImpl::objectStore):
2071         (WebCore::IDBTransactionBackendImpl::abort):
2072         (WebCore::IDBTransactionBackendImpl::commit):
2073
2074 2012-12-03  Alexis Menard  <alexis@webkit.org>
2075
2076         [Mac] Enable CSS3 background-position offset by default.
2077         https://bugs.webkit.org/show_bug.cgi?id=103905
2078
2079         Reviewed by Simon Fraser.
2080
2081         Turn the flag on by default.
2082
2083         No new tests : covered by tests landed previously.
2084
2085         * Configurations/FeatureDefines.xcconfig:
2086         * css/CSSToStyleMap.cpp:
2087         (WebCore::CSSToStyleMap::mapFillXPosition): Build fix in release on Mac with unused variable.
2088         (WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
2089
2090 2012-12-03  Jan Keromnes  <janx@linux.com>
2091
2092         Web Inspector: Implement context menus in CodeMirrorTextEditor
2093         https://bugs.webkit.org/show_bug.cgi?id=94062
2094
2095         Reviewed by Pavel Feldman.
2096
2097         Listen for contextmenu events in the editor and handle them differently
2098         if triggered on gutter line number or in text body. This adds controls
2099         for breakpoints (including disabled / conditional), debugger navigation
2100         and text input methods.
2101
2102         * inspector/front-end/CodeMirrorTextEditor.js:
2103         (WebInspector.CodeMirrorTextEditor):
2104         (WebInspector.CodeMirrorTextEditor.prototype._contextMenu):
2105
2106 2012-12-03  Nate Chapin  <japhet@chromium.org>
2107
2108         Make MainResourceLoader not use m_frame directly.
2109         https://bugs.webkit.org/show_bug.cgi?id=103907
2110
2111         Reviewed by Darin Adler.
2112
2113         MainResourceLoader will soon cease to be a ResourceLoader subclass.  It currently
2114         makes extensively use of both m_documentLoader and m_frame from ResourceLoader.
2115         By moving everything over to going through m_documentLoader, we reduce the number
2116         of members we have to add to MainResourceLoader in https://bugs.webkit.org/show_bug.cgi?id=49246.
2117
2118         No new tests, refactor only.
2119
2120         * loader/DocumentLoader.cpp:
2121         (WebCore::DocumentLoader::startLoadingMainResource):
2122         * loader/MainResourceLoader.cpp:
2123         (WebCore::MainResourceLoader::MainResourceLoader):
2124         (WebCore::MainResourceLoader::create):
2125         (WebCore::MainResourceLoader::receivedError):
2126         (WebCore::MainResourceLoader::willSendRequest):
2127         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2128         (WebCore::MainResourceLoader::didReceiveResponse):
2129         (WebCore::MainResourceLoader::didReceiveData):
2130         (WebCore::MainResourceLoader::startDataLoadTimer):
2131         * loader/MainResourceLoader.h:
2132         (MainResourceLoader):
2133
2134 2012-12-03  Anton Vayvod  <avayvod@chromium.org>
2135
2136         Text Autosizing: don't autosize horizontal menu items implemented via floating list items
2137         https://bugs.webkit.org/show_bug.cgi?id=103840
2138
2139         Reviewed by Kenneth Rohde Christiansen.
2140
2141         Floating list items are often used to implement horizontal menus. Currently, text autosizing 
2142         disregards such elements as autosizing containers. List items are often then autosized as part
2143         of a bigger cluster (usually the whole page) and look too big.
2144         This change turns floating list items into autosizing clusters so they are autosized separately
2145         resulting in no font size multiplication for menu items implemented in this manner.
2146
2147         Test: fast/text-autosizing/cluster-list-item.html
2148
2149         * rendering/TextAutosizer.cpp:
2150         (WebCore::TextAutosizer::isAutosizingContainer): Returns true for floating list items; split the
2151         condition logically.
2152
2153 2012-12-03  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
2154
2155         Optimization in image decoding
2156         https://bugs.webkit.org/show_bug.cgi?id=88424
2157
2158         Reviewed by Brent Fulgham.
2159
2160         Replace int with J_COLOR_SPACE in parameters of templates setPixel and
2161         outputScanlines to avoid casting from int to enum. It required move 
2162         inclusion of jpeglib.h and related #if to JPEGImageDecoder.h .
2163
2164         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2165         (WebCore):
2166         (WebCore::setPixel):
2167         (WebCore::JPEGImageDecoder::outputScanlines):
2168         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2169         (JPEGImageDecoder):
2170
2171 2012-12-03  Tony Chang  <tony@chromium.org>
2172
2173         [mathml] Improve performance of nested sup or sub elements
2174         https://bugs.webkit.org/show_bug.cgi?id=103665
2175
2176         Reviewed by Darin Adler.
2177
2178         Reduce the number of extra layouts. Since RenderMathMLSubSup calls
2179         layout twice, this can lead to an exponential number of layouts. Avoid
2180         extra layouts.
2181
2182         Test: mathml/presentation/sup-nested.html - Should not time out.
2183
2184         * css/mathml.css:
2185         (msup): Stretching children also causes extra layouts. Avoid this by aligning to the top.
2186         (msub): Same as msup, but align to the bottom.
2187         * rendering/mathml/RenderMathMLSubSup.cpp:
2188         (WebCore::RenderMathMLSubSup::layout): Only do the second layout if the padding changed.
2189         Also fix up the calls to setNeedsLayout (since we're calling it on this) and
2190         setChildNeedsLayout (since we're calling it on a child).
2191
2192 2012-12-03  Konrad Piascik  <kpiascik@rim.com>
2193
2194         Web Inspector: free Page resources on inspector disconnect
2195         https://bugs.webkit.org/show_bug.cgi?id=103888
2196
2197         Reviewed by Yury Semikhatsky.
2198
2199         We don't need to keep the page around and can free up memory when disconnecting web inspector.
2200
2201         Not testable.
2202
2203         * inspector/InspectorController.cpp:
2204         (WebCore::InspectorController::disconnectFrontend):
2205         * inspector/InspectorOverlay.cpp:
2206         (WebCore::InspectorOverlay::freePage):
2207         (WebCore):
2208         * inspector/InspectorOverlay.h:
2209         (InspectorOverlay):
2210
2211 2012-12-03  Alexis Menard  <alexis@webkit.org>
2212
2213         [GTK] Enable CSS3 background-background position offset by default.
2214         https://bugs.webkit.org/show_bug.cgi?id=103903
2215
2216         Reviewed by Philippe Normand.
2217
2218         Turn the feature on by default.
2219
2220         No new tests : covered by tests already landed.
2221
2222         * GNUmakefile.features.am:
2223
2224 2012-12-03  Hajime Morrita  <morrita@google.com>
2225
2226         Corrupted DOM tree during appendChild/insertBefore
2227         https://bugs.webkit.org/show_bug.cgi?id=103601
2228
2229         Reviewed by Abhishek Arya.
2230
2231         There are some missing protection in appendChild() and insertBefore().
2232         This change added these.
2233
2234         Dromaeo dom-modify shows no speed regression (5445run/s before vs 5351run/s after)
2235
2236         Tests: fast/events/mutation-during-append-child.html
2237                fast/events/mutation-during-insert-before.html
2238
2239         * dom/ContainerNode.cpp:
2240         (WebCore::checkAcceptChildGuaranteedNodeTypes):
2241         (WebCore):
2242         (WebCore::ContainerNode::insertBefore):
2243         (WebCore::ContainerNode::appendChild):
2244
2245 2012-12-03  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
2246
2247         Document::initSecurityContext() fails to call securityOrigin().grantLoadLocalResources()
2248         https://bugs.webkit.org/show_bug.cgi?id=68711
2249
2250         Reviewed by Adam Barth.
2251
2252         It currently fails since Document::loader() will return 0 until
2253         Frame::setDocument is called and we are doing this check before it happens.
2254
2255         Delay the check and let the FrameLoader take care of doing grantLoadLocalResources()
2256         on the Document along with other header checks in FrameLoader::didBeginDocument.
2257
2258         * dom/Document.cpp:
2259         (WebCore::Document::initSecurityContext):
2260         * loader/FrameLoader.cpp:
2261         (WebCore::FrameLoader::didBeginDocument):
2262
2263 2012-12-03  Yong Li  <yoli@rim.com>
2264
2265         ENABLE(IMAGE_DECODER_DOWN_SAMPLING): Should use TURBO_JPEG_RGB_SWIZZLE fast path for non-scaled images
2266         https://bugs.webkit.org/show_bug.cgi?id=103749
2267
2268         Reviewed by Rob Buis.
2269
2270         Replace !ENABLE(IMAGE_DECODER_DOWN_SAMPLING) with !m_scaled.
2271
2272         No new tests as existing jpegs are good with IMAGE_DECODER_DOWN_SAMPLING set up.
2273
2274         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2275         (WebCore::JPEGImageDecoder::outputScanlines):
2276
2277 2012-12-03  Tommy Widenflycht  <tommyw@google.com>
2278
2279         Speech Recognition API: Update SpeechRecognitionEvent to match the specification
2280         https://bugs.webkit.org/show_bug.cgi?id=103407
2281
2282         Reviewed by Kentaro Hara.
2283
2284         Specification for the Speech Recognition API:
2285         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
2286
2287         This patch does the following:
2288         o Adds results, and removing result, on SpeechRecognitionEvent
2289         o Renaming SpeechRecognitionResult::final to isFinal
2290         o Removing emma from SpeechRecognitionResult
2291
2292         The emma attribute is supposed to move from SpeechRecognitionResult to the SpeechRecognitionEvent,
2293         but that caused GC issues for unrelated code so it will be added later when properly fixed.
2294
2295         Existing tests updated to test the new API.
2296
2297         * Modules/speech/SpeechRecognition.cpp:
2298         (WebCore::SpeechRecognition::start):
2299         (WebCore::SpeechRecognition::didReceiveResults):
2300         (WebCore):
2301         * Modules/speech/SpeechRecognition.h:
2302         (SpeechRecognition):
2303         * Modules/speech/SpeechRecognitionEvent.cpp:
2304         (WebCore::SpeechRecognitionEvent::createResult):
2305         (WebCore):
2306         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
2307         (WebCore::SpeechRecognitionEvent::~SpeechRecognitionEvent):
2308         * Modules/speech/SpeechRecognitionEvent.h:
2309         (SpeechRecognitionEventInit):
2310         (SpeechRecognitionEvent):
2311         (WebCore::SpeechRecognitionEvent::resultIndex):
2312         (WebCore::SpeechRecognitionEvent::results):
2313         * Modules/speech/SpeechRecognitionEvent.idl:
2314         * Modules/speech/SpeechRecognitionResult.cpp:
2315         * Modules/speech/SpeechRecognitionResult.h:
2316         (WebCore::SpeechRecognitionResult::isFinal):
2317         (SpeechRecognitionResult):
2318         * Modules/speech/SpeechRecognitionResult.idl:
2319         * WebCore.gypi:
2320         * bindings/js/JSDictionary.cpp:
2321         (WebCore::JSDictionary::convertValue):
2322         (WebCore):
2323         * bindings/js/JSDictionary.h:
2324         * bindings/v8/Dictionary.cpp:
2325         (WebCore::Dictionary::get):
2326         (WebCore):
2327         * bindings/v8/Dictionary.h:
2328         (Dictionary):
2329         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp: Removed.
2330
2331 2012-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
2332
2333         Unreviewed, rolling out r136377.
2334         http://trac.webkit.org/changeset/136377
2335         https://bugs.webkit.org/show_bug.cgi?id=103881
2336
2337         Causes crashes on debug builds that use JSC. (Requested by
2338         mkwst on #webkit).
2339
2340         * Modules/websockets/WebSocket.cpp:
2341         (WebCore::WebSocket::connect):
2342         * Modules/websockets/WebSocketChannel.cpp:
2343         (WebCore::WebSocketChannel::didFailSocketStream):
2344         * css/MediaList.cpp:
2345         (WebCore::addResolutionWarningMessageToConsole):
2346         * dom/Document.cpp:
2347         (WebCore::Document::logExceptionToConsole):
2348         (WebCore::Document::processHttpEquiv):
2349         * dom/Document.h:
2350         (Document):
2351         * dom/ScriptExecutionContext.h:
2352         (ScriptExecutionContext):
2353         * dom/ViewportArguments.cpp:
2354         (WebCore):
2355         (WebCore::parserLineNumber):
2356         (WebCore::reportViewportWarning):
2357         * html/HTMLFormElement.cpp:
2358         (WebCore::HTMLFormElement::validateInteractively):
2359         * html/HTMLIFrameElement.cpp:
2360         (WebCore::HTMLIFrameElement::parseAttribute):
2361         * html/canvas/WebGLRenderingContext.cpp:
2362         (WebCore):
2363         (WebCore::WebGLRenderingContext::printWarningToConsole):
2364         * inspector/ConsoleMessage.cpp:
2365         (WebCore::ConsoleMessage::ConsoleMessage):
2366         * inspector/ConsoleMessage.h:
2367         (ConsoleMessage):
2368         * inspector/InspectorConsoleAgent.cpp:
2369         (WebCore::InspectorConsoleAgent::enable):
2370         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2371         (WebCore::InspectorConsoleAgent::count):
2372         * loader/FrameLoader.cpp:
2373         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
2374         * loader/MainResourceLoader.cpp:
2375         (WebCore::MainResourceLoader::didReceiveResponse):
2376         * page/Console.cpp:
2377         * page/Console.h:
2378         (Console):
2379         * page/DOMWindow.cpp:
2380         (WebCore::DOMWindow::printErrorMessage):
2381         * svg/SVGDocumentExtensions.cpp:
2382         (WebCore):
2383         (WebCore::parserLineNumber):
2384         (WebCore::reportMessage):
2385         * workers/WorkerContext.cpp:
2386         * workers/WorkerContext.h:
2387         (WorkerContext):
2388
2389 2012-12-03  Kihong Kwon  <kihong.kwon@samsung.com>
2390
2391         Remove useless included header and change position of Proximity Events test cases
2392         https://bugs.webkit.org/show_bug.cgi?id=103871
2393
2394         Reviewed by Antonio Gomes.
2395
2396         Remove useless included header from DeviceProximityEvent.cpp.
2397
2398         No new tests, It is just code refactoring.
2399
2400         * Modules/proximity/DeviceProximityEvent.cpp:
2401
2402 2012-12-03  Jussi Kukkonen  <jussi.kukkonen@intel.com>
2403
2404         [GStreamer] initial volume events on media elements should happen earlier
2405         https://bugs.webkit.org/show_bug.cgi?id=96912
2406
2407         Reviewed by Philippe Normand.
2408
2409         Update mediaelement volume and mute properties to whatever values
2410         playbin has as soon as possible (when the playbin reaches PAUSED state).
2411         This will improve user experience as the volume visuals won't suddenly
2412         change when user clicks play.
2413
2414         No new tests: media/event-attributes.html already tests media events.
2415         Unfortunately this test is flaky on EFL and GTK (more specifically
2416         it is flaky on pulseaudio-using gstreamer platforms: http://webkit.org/b/83704).
2417
2418         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2419         (WebCore::MediaPlayerPrivateGStreamer::load):
2420         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2421         (MediaPlayerPrivateGStreamer):
2422
2423 2012-12-03  Alexis Menard  <alexis@webkit.org>
2424
2425         Unreviewed build fix after r136378.
2426
2427         * css/CSSPrimitiveValueMappings.h:
2428         (WebCore):
2429         (WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
2430
2431 2012-12-03  Alexis Menard  <alexis@webkit.org>
2432
2433         [CSS3 Backgrounds and Borders] Implement CSS3 background-position offsets rendering.
2434         https://bugs.webkit.org/show_bug.cgi?id=103440
2435
2436         Reviewed by Julien Chaffraix.
2437
2438         Add the rendering bits of the new background-position offsets. It adds
2439         new bits in FillLayer to store the edges used to position the
2440         background. The old x and y members are used the same way as before, to
2441         store the value of the offset.
2442
2443         Test: fast/backgrounds/background-position-rendering.html
2444
2445         * css/CSSComputedStyleDeclaration.cpp:
2446         (WebCore::createPositionListForLayer): Refactor into a function the
2447         code duplicated in getPropertyCSSValue to avoid more code
2448         duplication.
2449         (WebCore):
2450         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2451         * css/CSSPrimitiveValueMappings.h:
2452         (WebCore):
2453         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2454         Add implicit conversion from the enums used in the rendering code to
2455         CSS values.
2456         (WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
2457         * css/CSSToStyleMap.cpp:
2458         (WebCore::CSSToStyleMap::mapFillXPosition):
2459         (WebCore::CSSToStyleMap::mapFillYPosition):
2460         * rendering/RenderBoxModelObject.cpp:
2461         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Add
2462         support for the new positioning and refactor a little naming of the
2463         variables for better readability.
2464         * rendering/style/FillLayer.cpp:
2465         (SameSizeAsFillLayer):
2466         (WebCore::FillLayer::FillLayer):
2467         (WebCore::FillLayer::operator=):
2468         (WebCore::FillLayer::operator==):
2469         (WebCore::FillLayer::fillUnsetProperties):
2470         (WebCore::FillLayer::fillUnsetProperties): When filling the layer with
2471         unset properties make sure we also set the x and y origins of the
2472         background in case they were set.
2473         * rendering/style/FillLayer.h:
2474         (WebCore::FillLayer::backgroundXOrigin):
2475         (WebCore::FillLayer::backgroundYOrigin):
2476         (WebCore::FillLayer::isBackgroundOriginSet):
2477         (FillLayer):
2478         (WebCore::FillLayer::setBackgroundXOrigin):
2479         (WebCore::FillLayer::setBackgroundYOrigin):
2480         (WebCore::FillLayer::clearPositionX):
2481         (WebCore::FillLayer::clearPositionY):
2482         * rendering/style/RenderStyleConstants.h:
2483
2484 2012-12-03  Mike West  <mkwst@chromium.org>
2485
2486         Web Inspector: Autogenerate stack traces and line numbers when possible.
2487         https://bugs.webkit.org/show_bug.cgi?id=100650
2488
2489         Reviewed by Yury Semikhatsky.
2490
2491         Console messages generated in WebCore generally are asked to do a bit of
2492         work in order to provide a developer with a detailed report. We ask the
2493         caller to either generate stack traces, or pass in a url/line number
2494         pair, which can be a bit of work. Predictably, most callers don't pass
2495         in what we'd like to see.
2496
2497         This patch creates a new, simpler console message generation API that we
2498         expect most call sites to use. Source, type, level, and message are
2499         required, and an optional request ID can be passed in. Everything else
2500         will be autogenerated inside ConsoleMessage when appropriate.
2501
2502         In a subsequent patch, we expect to be able to trim down more of the
2503         external call sites (ContentSecurityPolicy springs to mind) in order to
2504         further consolidate the external interface. Simple is good.
2505
2506         * Modules/websockets/WebSocket.cpp:
2507         (WebCore::WebSocket::connect):
2508         * Modules/websockets/WebSocketChannel.cpp:
2509         (WebCore::WebSocketChannel::didFailSocketStream):
2510             Drop the now-redundant URL parameter from various WebSocket errors.
2511         * css/MediaList.cpp:
2512         (WebCore::addResolutionWarningMessageToConsole):
2513             Switch to Document::addConsoleMessage, which means that we can move
2514             line-number generation out of MediaList.
2515         * dom/Document.cpp:
2516         (WebCore::Document::logExceptionToConsole):
2517             Use the long-form 'addMessage()' rather than the public interface.
2518         (WebCore::Document::processHttpEquiv):
2519             Drop the URL parameter, as it's now autogenerated.
2520         (WebCore::Document::addConsoleMessage):
2521         (WebCore):
2522         * dom/Document.h:
2523         (Document):
2524             Override the pure virtual method on ScriptExecutionContext, and pass
2525             the call through to the new Console::addMessage, which accepts a
2526             pointer to the Document in order to do line-number generation.
2527         * dom/ScriptExecutionContext.h:
2528         (ScriptExecutionContext):
2529             Add a pure virtual variant of addConsoleMessage which accepts only
2530             bare minimum data, and expects autogeneration of the rest.
2531             Additionally, ensure that the other variants always have either a
2532             URL/line number, or a stack trace.
2533         * dom/ViewportArguments.cpp:
2534         (WebCore::reportViewportWarning):
2535             Drop line numbers and URLs from Viewport warnings. We can generate
2536             these now.
2537         * html/HTMLFormElement.cpp:
2538         (WebCore::HTMLFormElement::validateInteractively):
2539             Drop the URL from form autofocus warnings
2540         * html/HTMLIFrameElement.cpp:
2541         (WebCore::HTMLIFrameElement::parseAttribute):
2542             Drop the URL and line from sandbox attribute warnings.
2543         * html/canvas/WebGLRenderingContext.cpp:
2544         (WebCore):
2545         (WebCore::WebGLRenderingContext::printWarningToConsole):
2546             Drop the URL from WebGL warnings.
2547         * inspector/ConsoleMessage.cpp:
2548         (WebCore::ConsoleMessage::ConsoleMessage):
2549             Call 'autogenerateMetadata' to ensure that a stack trace is
2550             generated if one isn't provided. Create a new constructor that
2551             accepts a ScriptState/ScriptArguments pair, and use it for console
2552             API calls.
2553         (WebCore):
2554         (WebCore::ConsoleMessage::autogenerateMetadata):
2555             Generate a stack trace given whatever information we've got.
2556         * inspector/ConsoleMessage.h:
2557         (ConsoleMessage):
2558             Create a new constructor that accepts a ScriptState/ScriptArguments
2559             pair, and use it for console API calls.
2560         * inspector/InspectorConsoleAgent.cpp:
2561         (WebCore::InspectorConsoleAgent::enable):
2562             Use the short-form ConsoleMessage constructor.
2563         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2564             Use the stack-only constructor, or the ScriptState
2565             constructor, as appropriate.
2566         (WebCore::InspectorConsoleAgent::count):
2567             We generated a stack, pass it in.
2568         * loader/FrameLoader.cpp:
2569         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
2570         * loader/MainResourceLoader.cpp:
2571         (WebCore::MainResourceLoader::didReceiveResponse):
2572             Drop the URL parameter from the console message for X-Frame-Options
2573             parsing errors.
2574         * page/Console.cpp:
2575         (WebCore::Console::addMessage):
2576             When given a Document*, generate a line number if: 1) the document
2577             is still being parsed, 2) the document is not in document.write(),
2578             3) the parser isn't waiting for script, and 4) the parser isn't
2579             executing script. Many callsites didn't check all of these, which
2580             is why the SVG rebaseline (for example) drops lots and lots of line
2581             numbers which point at a closing '</script>' tag.
2582         (WebCore):
2583         * page/Console.h:
2584         (WebCore):
2585         (Console):
2586             Update the public API to accept a Document* and little else.
2587         * page/DOMWindow.cpp:
2588         (WebCore::DOMWindow::printErrorMessage):
2589             Don't generate a stack here. We can do it later.
2590         * svg/SVGDocumentExtensions.cpp:
2591         (WebCore::reportMessage):
2592             Drop the URL and line number. We'll generate them. It'll be sweet.
2593         * workers/WorkerContext.cpp:
2594         (WebCore::WorkerContext::addConsoleMessage):
2595             Generate a stack here, as we likely won't have the context to do
2596             so later. Pass it through.
2597         (WebCore):
2598         * workers/WorkerContext.h:
2599         (WorkerContext):
2600             Implement the new addConsoleMessage variant.
2601
2602 2012-12-03  Gabor Rapcsanyi  <rgabor@webkit.org>
2603
2604         [Qt] Remove an unnecessary masking from swapBgrToRgb()
2605         https://bugs.webkit.org/show_bug.cgi?id=103630
2606
2607         Reviewed by Zoltan Herczeg.
2608
2609         Get rid of a masking command in swapBgrToRgb() to speed up a little bit.
2610
2611         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2612         (WebCore::swapBgrToRgb):
2613
2614 2012-12-03  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2615
2616         CSS Device Adaptation: window.innerWidth returns wrong value if CSS viewport descriptors are applied
2617         https://bugs.webkit.org/show_bug.cgi?id=103737
2618
2619         Reviewed by Kenneth Rohde Christiansen.
2620
2621         ViewportStyleResolver used frame view visibleContentRect size as initial viewport size.
2622         This however caused a problem when page enabled/disabled CSS stylesheets, having viewport
2623         descriptors. Viewport descriptors from new stylesheet were applied to the visibleContentRect
2624         affected already by the viewport descriptors from the previous stylesheet.
2625
2626         New 'initialViewportSize' property (http://dev.w3.org/csswg/css-device-adapt/#initial-viewport)
2627         was added to frame view so that viewport descriptors can always be applied to the reliable
2628         viewport size.
2629
2630         Test: css3/device-adapt/viewport-width-check-window-innerwidth-correct.html
2631
2632         * css/ViewportStyleResolver.cpp:
2633         (WebCore::ViewportStyleResolver::ViewportStyleResolver):
2634         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
2635         * css/ViewportStyleResolver.h:
2636         (ViewportStyleResolver):
2637         * dom/Document.cpp:
2638         (WebCore):
2639         (WebCore::Document::initialViewportSize):
2640         * dom/Document.h:
2641         (Document):
2642         * page/FrameView.h:
2643         (FrameView):
2644         (WebCore::FrameView::initialViewportSize):
2645         (WebCore::FrameView::setInitialViewportSize):
2646
2647 2012-12-03  Alexander Pavlov  <apavlov@chromium.org>
2648
2649         Web Inspector: [Styles] Retain selector case as written in the source code
2650         https://bugs.webkit.org/show_bug.cgi?id=103118
2651
2652         Reviewed by Antti Koivisto.
2653
2654         This change:
2655         - adds parsing of selector group components in the CSSParser;
2656         - builds the SelectorList.selectors based on the source code whenever possible.
2657           Strips [multiline] comments and whitespace;
2658         - adds the MultilineMode to RegularExpression.
2659
2660         Test: inspector/styles/selector-list.html
2661
2662         * WebCore.exp.in: Update the exported symbol.
2663         * css/CSSGrammar.y.in: Add invocations for CSSParser::markSelector[Start|End]() as required.
2664         * css/CSSParser.cpp:
2665         (WebCore::CSSParser::markSelectorStart): Gets invoked to mark a selector group item start offset.
2666         (WebCore::CSSParser::markSelectorEnd): Ditto for the end offset.
2667         * css/CSSParser.h: Add new methods and a SourceRange tracking field.
2668         * css/CSSPropertySourceData.h: Add SelectorRangeList to the CSSRuleSourceData.
2669         * inspector/InspectorStyleSheet.cpp:
2670         (WebCore::selectorsFromSource): Builds the SelectorList based on the underlying source data.
2671         Strips comments and whitespace from selectors.
2672         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
2673         Builds SelectorList based on the availability of the source code.
2674         * inspector/front-end/StylesSidebarPane.js:
2675         (WebInspector.StylePropertiesSection.prototype._markSelectorMatches):
2676         Update selectors in all cases to make use of the source-based information whenever possible.
2677         * platform/text/RegularExpression.cpp:
2678         Add the MultilineMode parameter into the constructor/factory method and ultimately pass it into YarrPattern.
2679         (WebCore::RegularExpression::Private::create): See above.
2680         (WebCore::RegularExpression::Private::Private): See above.
2681         (WebCore::RegularExpression::Private::compile): See above.
2682         (WebCore::RegularExpression::RegularExpression): See above.
2683         * platform/text/RegularExpression.h:
2684         Add enum MultilineMode, modify constructor and factory method signatures accordingly.
2685
2686 2012-12-02  Noel Gordon  <noel.gordon@gmail.com>
2687
2688         ImageOrientation::transformFromDefault() case labels should be in numerical order
2689         https://bugs.webkit.org/show_bug.cgi?id=101596
2690
2691         Reviewed by Simon Fraser.
2692
2693         Place the orientation case labels in numerical order to better match the EXIF2.2 spec
2694         definitions of orientation values and their ImageOrientation.h enumeration.
2695
2696         No change in behavior. Covered by existing tests:
2697            fast/images/exif-orientation-css.html
2698            fast/images/exif-orientation-image-document.html
2699            fast/images/exif-orientation.html
2700
2701         * platform/graphics/ImageOrientation.cpp:
2702         (WebCore::ImageOrientation::transformFromDefault): Numerically order the orientation 
2703         case statement labels.
2704
2705 2012-12-02  Mary Wu  <mary.wu@torchmobile.com.cn>
2706
2707         should sniff it if mimetype don't contain a slash.
2708         https://bugs.webkit.org/show_bug.cgi?id=102778
2709
2710         Reviewed by George Staikos.
2711
2712         Based on http://mimesniff.spec.whatwg.org/, a valid media type
2713         is the string represented by concatenating type, the string "/",
2714         and subtype. So if the mimetype don't contain slash, we should
2715         possible get sniffed type from the content like Firefox/chrome/safari.
2716
2717         RIM Bug# 219590, internally reviewed by Liam Quinn.
2718
2719         No new tests, the patch only impact qt/blackberry porting to be consistent
2720         with chrome, other portings have their own behavior.
2721
2722         * platform/network/MIMESniffing.cpp:
2723         (std::isUnknownType):
2724
2725 2012-12-02  Otto Derek Cheung  <otcheung@rim.com>
2726
2727         [BlackBerry] Adding checks for null when checking cookie status in CookieJarBlackBerry
2728         https://bugs.webkit.org/show_bug.cgi?id=103748
2729
2730         Reviewed by Rob Buis.
2731
2732         The logic is flipped in the previous patch.
2733
2734         * loader/blackberry/CookieJarBlackBerry.cpp:
2735         (WebCore::cookiesEnabled):
2736
2737 2012-12-02  Robert Hogan  <robert@webkit.org>
2738
2739         Bad rendering of web page because of image's height is set to 100%
2740         https://bugs.webkit.org/show_bug.cgi?id=28035
2741
2742         Reviewed by Eric Seidel.
2743
2744         Call computeReplacedLogicalHeight() to get the correct logical height of a replaced element
2745         for calculating the element's width. RenderBox::computeLogicalHeightUsing() is a helper function designed for finding
2746         the min and max height values and is not the way to find the actual used height of a replaced element.
2747
2748         WebKit's quirks-mode behaviour for the test case is unaffected by this change.
2749
2750         Tests: fast/css/computed-image-width-with-percent-height-quirksmode.html
2751                fast/css/computed-image-width-with-percent-height.html
2752
2753         * rendering/RenderReplaced.cpp:
2754         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2755
2756 2012-12-02  Mihnea Ovidenie  <mihnea@adobe.com>
2757
2758         [CSS Regions] regionlayoutupdate event fires continuously
2759         https://bugs.webkit.org/show_bug.cgi?id=102101
2760
2761         Reviewed by David Hyatt.
2762
2763         According to the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#region-flow-layout-events, the regionlayoutupdate event
2764         should be dispatched when there is a possible layout change in the region chain.
2765         In the current implementation, regionlayoutupdate is dispatched when:
2766         1. a region from region chain changed its regionOverset value
2767         2. a region from region chain has regionOverset = fit| overset
2768
2769         In the case of a named flow having an auto-height region with regionOverset = fit, the second step of layout was done
2770         also when there was not required, therefore the regionlayoutuodate was unnecessary triggered.
2771
2772         We should proceed with the 2-pass layout only if the flow-thread having auto-height regions in region chain needs layout.
2773
2774         Test: fast/regions/autoheight-regionlayoutupdate-multipletimes.html
2775
2776         * rendering/FlowThreadController.cpp:
2777         (WebCore::FlowThreadController::hasRenderNamedFlowThreadsNeedingLayout):
2778         * rendering/FlowThreadController.h:
2779         * rendering/RenderView.cpp:
2780         (WebCore::RenderView::layout):
2781
2782 2012-12-02  Rik Cabanier  <cabanier@adobe.com>
2783
2784         Extend JavaScript support for blending in canvas
2785         https://bugs.webkit.org/show_bug.cgi?id=101804
2786
2787         Reviewed by Dirk Schulze.
2788
2789         Added parsing code and variables to support additional canvas blend modes
2790         see spec: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#canvascompositingandblending
2791
2792         Test: canvas/philip/tests/2d.composite.globalComposite.html
2793
2794         * html/HTMLImageElement.cpp:
2795         (WebCore::HTMLImageElement::parseAttribute):
2796         * html/canvas/CanvasRenderingContext2D.cpp:
2797         (WebCore::CanvasRenderingContext2D::State::State):
2798         (WebCore::CanvasRenderingContext2D::State::operator=):
2799         (WebCore::CanvasRenderingContext2D::globalCompositeOperation):
2800         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation):
2801         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
2802         * html/canvas/CanvasRenderingContext2D.h:
2803         (State):
2804         * platform/graphics/GraphicsTypes.cpp:
2805         (WebCore):
2806         (WebCore::parseCompositeAndBlendOperator):
2807         (WebCore::compositeOperatorName):
2808         * platform/graphics/GraphicsTypes.h:
2809
2810 2012-12-02  KyungTae Kim  <ktf.kim@samsung.com>
2811
2812         [EFL] Fix build warning in GraphicsContext3DEfl.cpp
2813         https://bugs.webkit.org/show_bug.cgi?id=103807
2814
2815         Reviewed by Laszlo Gombos.
2816
2817         Because GraphicsContext3D::ImageExtractor::extractImage is not implemented yet, 
2818         comment out the parameter names for removing -Wunused-parameter warnings.
2819
2820         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2821         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
2822
2823 2012-12-02  Andreas Kling  <akling@apple.com>
2824
2825         Keep ElementAttributeData sharing cache open for a while after document parsing finishes.
2826         <http://webkit.org/b/103720>
2827
2828         Reviewed by Antti Koivisto.
2829
2830         Allow web pages that generate content dynamically to benefit more from the ElementAttributeData sharing
2831         cache by keeping it open for 10 seconds after document parsing finishes. This enables elements constructed
2832         from HTML fragments to share attribute data with other identical elements.
2833
2834         Elements created via Document.createElement are still unsupported since we don't know the list of attributes
2835         at the time of construction.
2836
2837         401kB progression on Membuster3.
2838
2839         Document now holds on to a DocumentSharedObjectPool, accessible via Document::sharedObjectPool().
2840         It is non-null during parsing and for some time afterwards, and can be used to implement additional
2841         caches that are not worth holding on to permanently.
2842
2843         * CMakeLists.txt:
2844         * GNUmakefile.list.am:
2845         * Target.pri:
2846         * WebCore.gypi:
2847         * WebCore.xcodeproj/project.pbxproj:
2848         * WebCore.vcproj/WebCore.vcproj:
2849
2850             Add new class DocumentSharedObjectPool.
2851
2852         * dom/Document.cpp:
2853         (WebCore::Document::Document):
2854         (WebCore::Document::setParsing):
2855         (WebCore::Document::finishedParsing):
2856         (WebCore::Document::sharedObjectPoolClearTimerFired):
2857         * dom/Document.h:
2858         (WebCore::Document::sharedObjectPool):
2859
2860             Create DocumentSharedObjectPool when parsing starts, kill it on a 10s timer after parsing finishes.
2861
2862         * dom/DocumentSharedObjectPool.cpp: Added.
2863         (ImmutableElementAttributeDataCacheKey):
2864         (WebCore::ImmutableElementAttributeDataCacheKey::ImmutableElementAttributeDataCacheKey):
2865         (WebCore::ImmutableElementAttributeDataCacheKey::operator!=):
2866         (WebCore::ImmutableElementAttributeDataCacheKey::hash):
2867         (ImmutableElementAttributeDataCacheEntry):
2868         (WebCore::ImmutableElementAttributeDataCacheEntry::ImmutableElementAttributeDataCacheEntry):
2869         (WebCore::DocumentSharedObjectPool::cachedImmutableElementAttributeData):
2870         (WebCore::DocumentSharedObjectPool::DocumentSharedObjectPool):
2871         (WebCore::DocumentSharedObjectPool::~DocumentSharedObjectPool):
2872         * dom/DocumentSharedObjectPool.h: Added.
2873         (DocumentSharedObjectPool):
2874         (WebCore::DocumentSharedObjectPool::create):
2875         * dom/Element.cpp:
2876         (WebCore::Element::parserSetAttributes):
2877
2878             Moved the ElementAttributeData cache to DocumentSharedObjectPool.
2879
2880 2012-12-02  John Bauman  <jbauman@chromium.org>
2881
2882         [chromium] Let Pepper Flash use integrated GPU
2883         https://bugs.webkit.org/show_bug.cgi?id=103800
2884
2885         Reviewed by Kenneth Russell.
2886
2887         Pepper Flash uses the SharedGraphicsContext3D as a parent, so don't
2888         require that to use the discrete GPU. This means that accelerated
2889         canvas will use the integrated GPU, but that will save battery life
2890         and seems acceptable. 
2891
2892         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
2893         (WebCore::SharedGraphicsContext3DImpl::createContext):
2894
2895 2012-12-02  Elliott Sprehn  <esprehn@gmail.com>
2896
2897         documentElement should not always get a renderer
2898         https://bugs.webkit.org/show_bug.cgi?id=103475
2899
2900         Reviewed by Ojan Vafai.
2901
2902         Only SVG documents need a renderer on the documentElement when it's
2903         display: none. This behavior is wrong, but there's assumptions in
2904         FrameView and SVGImage that depend on a RenderSVGRoot existing for all
2905         loaded SVG document and images.
2906
2907         The current code has logic that makes it appear as if we always create
2908         a renderer for the documentElement even when it's display: none, but
2909         because HTMLElement::createRenderer doesn't call super we end up with
2910         HTMLElement::rendererIsNeeded returning true for display: none, but
2911         HTMLElement::createRenderer returning null.
2912
2913         Instead of this generic documentElement logic only special case SVG
2914         until someone can fix Bug 103493 so we don't need it.
2915
2916         Test: fast/css/display-none-documentElement.html
2917
2918         * dom/Element.cpp:
2919         (WebCore::Element::rendererIsNeeded):
2920         (WebCore::Element::createRenderer):
2921         * svg/SVGSVGElement.cpp:
2922         (WebCore::SVGSVGElement::rendererIsNeeded):
2923         * svg/SVGSVGElement.h:
2924         (SVGSVGElement):
2925
2926 2012-12-02  Pan Deng  <pan.deng@intel.com>
2927
2928         [Resource Timing] implementation of cross origin resouce timing restrictions.
2929         https://bugs.webkit.org/show_bug.cgi?id=84886.
2930
2931         Reviewed by Tony Gentilcore.
2932
2933         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.
2934
2935         Tests: http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html
2936                http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html
2937
2938         * page/Performance.cpp:
2939         (WebCore::passesTimingAllowCheck):
2940         (WebCore):
2941         (WebCore::Performance::addResourceTiming):
2942         * page/Performance.h:
2943         (WebCore):
2944         (Performance):
2945         * page/PerformanceResourceTiming.cpp:
2946         (WebCore):
2947         * page/PerformanceResourceTiming.h:
2948         (WebCore::PerformanceResourceTiming::create):
2949         (PerformanceResourceTiming):
2950
2951 2012-12-02  Elliott Sprehn  <esprehn@gmail.com>
2952
2953         Simplify treeScope and setTreeScope
2954         https://bugs.webkit.org/show_bug.cgi?id=103708
2955
2956         Reviewed by Hajime Morita.
2957
2958         By making the default treeScope in NodeRareData the document and then
2959         moving the m_treeScope field to NodeRareDataBase we can make treeScope
2960         inline and make setTreeScope much simpler.
2961
2962         There's also no reason to save calls to rareData() now that the map has
2963         been eliminated by r133372 so we can eliminate the return value from
2964         setTreeScope.
2965
2966         No new tests, just refactoring.
2967
2968         * WebCore.exp.in:
2969         * dom/Document.h:
2970         (WebCore::Node::treeScope):
2971         (WebCore):
2972         * dom/Element.cpp:
2973         (WebCore::Element::createRareData):
2974         * dom/ElementRareData.h:
2975         (ElementRareData):
2976         (WebCore::ElementRareData::ElementRareData):
2977         * dom/Node.cpp:
2978         (WebCore::Node::setTreeScope):
2979         (WebCore::Node::createRareData):
2980         * dom/Node.h:
2981         (NodeRareDataBase):
2982         (WebCore::NodeRareDataBase::treeScope):
2983         (WebCore::NodeRareDataBase::setTreeScope):
2984         (WebCore::NodeRareDataBase::NodeRareDataBase):
2985         (Node):
2986         * dom/NodeRareData.cpp:
2987         (WebCore::NodeRareData::reportMemoryUsage):
2988         * dom/NodeRareData.h:
2989         (WebCore::NodeRareData::NodeRareData):
2990         (NodeRareData):
2991         * dom/TreeScopeAdopter.cpp:
2992         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2993
2994 2012-12-02  Justin Novosad  <junov@google.com>
2995
2996         Fix occlusion culling logic to handle css background layer clipping
2997         https://bugs.webkit.org/show_bug.cgi?id=103276
2998
2999         Reviewed by Simon Fraser.
3000
3001         Bug was introduced by r135629
3002         This patch fixes it by verifying layer clip.  A fill layer must
3003         not be treated as if it occludes the layers under it unless it has
3004         a larger or equal clip setting than the layers under it.
3005
3006         Test: fast/backgrounds/background-opaque-clipped-gradients.html
3007
3008         * rendering/RenderBox.cpp:
3009         (WebCore::RenderBox::paintFillLayers):
3010         * rendering/style/FillLayer.cpp:
3011         (WebCore::clipMax):
3012         (WebCore::FillLayer::computeClipMax):
3013         (WebCore::FillLayer::clipOccludesNextLayers):
3014         * rendering/style/FillLayer.h:
3015         (FillLayer):
3016
3017 2012-12-02  Tony Chang  <tony@chromium.org>
3018
3019         Avoid a second layout of flex items in layoutAndPlaceChildren()
3020         https://bugs.webkit.org/show_bug.cgi?id=102352
3021
3022         Reviewed by Ojan Vafai.
3023
3024         Avoid doing a second layout if we're going to get the same size as before.
3025         This prevents us from doing an exponential number of layouts in some
3026         common cases.
3027
3028         Test: css3/flexbox/stretch-after-sibling-size-change.html
3029
3030         * html/shadow/SliderThumbElement.cpp:
3031         (WebCore::RenderSliderContainer::layout): Force a layout of the track, which positions the thumb.
3032         * rendering/RenderFlexibleBox.cpp:
3033         (WebCore::RenderFlexibleBox::needToStretchChild): Determine if a child is going to stretch.
3034         (WebCore::RenderFlexibleBox::resetAutoMarginsAndLogicalTopInCrossAxis): Makes sure we're in a consistent state before
3035         we apply auto margins.
3036         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3037         * rendering/RenderFlexibleBox.h: Add needToStretchChild.
3038
3039 2012-12-02  Yongjun Zhang  <yongjun_zhang@apple.com>
3040
3041         Need a method to close all idle localstorage databases immediately.
3042         https://bugs.webkit.org/show_bug.cgi?id=103469
3043
3044         Reviewed by David Kilzer.
3045
3046         Add a new PageGroup method closeIdleLocalStorageDatabases, which walks through
3047         all local storage areas that don't have document referencing to them and closes
3048         their underlying databases.
3049
3050         Test: storage/domstorage/localstorage/close-idle-localstorage-databases-immediately.html
3051
3052         * WebCore.exp.in:
3053         * page/PageGroup.cpp:
3054         (WebCore::PageGroup::clearLocalStorageForOrigin):
3055         (WebCore):
3056         (WebCore::PageGroup::closeIdleLocalStorageDatabases): walking through all idle local storages and
3057             closing their databases.
3058         * page/PageGroup.h:
3059         (PageGroup):
3060         * storage/StorageArea.h:
3061         (WebCore::StorageArea::closeDatabaseIfIdle):
3062         * storage/StorageAreaImpl.cpp:
3063         (WebCore::StorageAreaImpl::closeDatabaseIfIdle): close the database if it is idle.
3064         (WebCore):
3065         * storage/StorageAreaImpl.h:
3066         (StorageAreaImpl):
3067         * storage/StorageNamespace.h:
3068         (StorageNamespace):
3069         * storage/StorageNamespaceImpl.cpp:
3070         (WebCore::StorageNamespaceImpl::closeIdleLocalStorageDatabases):
3071         (WebCore):
3072         * storage/StorageNamespaceImpl.h:
3073         (StorageNamespaceImpl):
3074
3075 2012-12-02  Otto Derek Cheung  <otcheung@rim.com>
3076
3077         [BlackBerry] Adding checks for null when checking cookie status in CookieJarBlackBerry
3078         https://bugs.webkit.org/show_bug.cgi?id=103748
3079
3080         Reviewed by Rob Buis.
3081
3082         Updating CookieJarBlackBerry::cookieEnabled and have other methods in the class call that
3083         method. Also, adding null checks for document->settings().
3084
3085         No change in behaviour.
3086
3087         * loader/blackberry/CookieJarBlackBerry.cpp:
3088         (WebCore::cookies):
3089         (WebCore::setCookies):
3090         (WebCore::cookiesEnabled):
3091         (WebCore::getRawCookies):
3092         (WebCore::deleteCookie):
3093         (WebCore::cookieRequestHeaderFieldValue):
3094
3095 2012-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
3096
3097         Unreviewed, rolling out r136236.
3098         http://trac.webkit.org/changeset/136236
3099         https://bugs.webkit.org/show_bug.cgi?id=103833
3100
3101         [chromium] Flakey crashes in SpeechRecognitionEvent::emma
3102         during GC. (Requested by mkwst on #webkit).
3103
3104         * Modules/speech/SpeechRecognition.cpp:
3105         (WebCore::SpeechRecognition::start):
3106         * Modules/speech/SpeechRecognition.h:
3107         (SpeechRecognition):
3108         * Modules/speech/SpeechRecognitionEvent.cpp:
3109         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
3110         * Modules/speech/SpeechRecognitionEvent.h:
3111         (SpeechRecognitionEventInit):
3112         (SpeechRecognitionEvent):
3113         (WebCore::SpeechRecognitionEvent::resultIndex):
3114         * Modules/speech/SpeechRecognitionEvent.idl:
3115         * Modules/speech/SpeechRecognitionResult.cpp:
3116         (WebCore::emmaQualifiedName):
3117         (WebCore):
3118         (WebCore::SpeechRecognitionResult::emma):
3119         * Modules/speech/SpeechRecognitionResult.h:
3120         (WebCore):
3121         (WebCore::SpeechRecognitionResult::final):
3122         (SpeechRecognitionResult):
3123         * Modules/speech/SpeechRecognitionResult.idl:
3124         * WebCore.gypi:
3125         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8SpeechRecognitionEventCustom.cpp.
3126         (WebCore):
3127         (WebCore::V8SpeechRecognitionResult::opaqueRootForGC):
3128
3129 2012-12-01  Sheriff Bot  <webkit.review.bot@gmail.com>
3130
3131         Unreviewed, rolling out r136015.
3132         http://trac.webkit.org/changeset/136015
3133         https://bugs.webkit.org/show_bug.cgi?id=103821
3134
3135         Did not heal performance bot and caused other performance
3136         regressions (Requested by abarth on #webkit).
3137
3138         * bindings/scripts/CodeGeneratorV8.pm:
3139         (GenerateHeader):
3140
3141 2012-12-01  Xiaobo Wang  <xiaobo.wang@torchmobile.com.cn>
3142
3143         DRT - crashed in WebCore::SearchFieldCancelButtonElement::defaultEventHandler
3144         https://bugs.webkit.org/show_bug.cgi?id=103592
3145
3146         Reviewed by Kent Tamura.
3147
3148         The crash happened when the search field cancel button handles mouseout
3149         event after the search input was detached. When it happens the input
3150         element returned from shadowHost() is null, need to check the pointer
3151         before dereferencing.
3152         InputFieldSpeechButton and SearchFieldResultsButtonElement have the
3153         similar issue.
3154
3155         No new tests. The patch fixes the following test on BlackBerry platform.
3156         Test: fast/forms/search-delete-while-cancel-button-clicked.html
3157
3158         * html/shadow/TextControlInnerElements.cpp:
3159         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
3160         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
3161         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
3162         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
3163         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
3164         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
3165
3166 2012-11-30  Mike West  <mkwst@chromium.org>
3167
3168         CSP 1.1: Make the CSP_NEXT flag runtime enabled.
3169         https://bugs.webkit.org/show_bug.cgi?id=103652
3170
3171         Reviewed by Adam Barth.
3172
3173         Content Security Policy 1.1 continues to live behind the CSP_NEXT flag,
3174         this patch adds another layer on top of that in order to enable runtime
3175         decisions about whether it should be active.
3176
3177         * bindings/generic/RuntimeEnabledFeatures.cpp:
3178         (WebCore):
3179         * bindings/generic/RuntimeEnabledFeatures.h:
3180         (RuntimeEnabledFeatures):
3181         (WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled):
3182         (WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled):
3183             Adds methods in order to correctly handle enabling and disabling
3184             CSP 1.1 features.
3185         * dom/Document.idl:
3186             Gate the 'document.securityPolicy' object on the runtime flag.
3187         * page/ContentSecurityPolicy.cpp:
3188         (WebCore::CSPDirectiveList::addDirective):
3189             Check that experimental features are runtime enabled before
3190             processing 1.1 directives.
3191         (WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled):
3192         (WebCore):
3193         * page/ContentSecurityPolicy.h:
3194             Adds a new method which checks against the runtime flag to determine
3195             whether CSP 1.1 features are enabled.
3196
3197 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
3198
3199         Avoid calling into NSUserDefaults every time we start a scroll
3200         https://bugs.webkit.org/show_bug.cgi?id=103804
3201
3202         Reviewed by Dan Bernstein.
3203
3204         Cache the NSScrollAnimationEnabled preference to avoid
3205         hitting NSUserDefaults every time we start scrolling.
3206
3207         * platform/mac/ScrollAnimatorMac.mm:
3208         (WebCore::scrollAnimationEnabledForSystem):
3209
3210 2012-11-30  Beth Dakin  <bdakin@apple.com>
3211
3212         https://bugs.webkit.org/show_bug.cgi?id=103790
3213         The LayerPool m_pruneTimer should have a longer delay
3214
3215         Reviewed by Simon Fraser.
3216
3217         A 1 second delay is more appropriate here.
3218         * platform/graphics/ca/mac/LayerPool.mm:
3219         (WebCore::LayerPool::schedulePrune):
3220
3221 2012-11-30  Jer Noble  <jer.noble@apple.com>
3222
3223         Unreviewed Windows build fix.
3224
3225         Add a default: entry to an case statement to fix a build error when compiled in VS2005.
3226
3227         * html/MediaController.cpp:
3228         (MediaController::playbackState):
3229
3230 2012-11-30  Jer Noble  <jer.noble@apple.com>
3231
3232         Add support for the 'unpause()' method on MediaController.
3233         https://bugs.webkit.org/show_bug.cgi?id=103751
3234
3235         Reviewed by Eric Carlson.
3236
3237         The MediaController spec has been updated to add an unpause() method
3238         which is functionally identical to the old play() method, and changes
3239         the semantics of play() to call play() on the underlying slaved media
3240         elements. The spec also added a playbackState() method, returning a
3241         string representing the last calculated playback state.
3242
3243         Test: media/media-controller-unpause.html
3244
3245         * html/MediaController.cpp:
3246         (MediaController::unpause): Renamed from play().
3247         (MediaController::play): Added. Same as unpause(), but also call
3248             play() on slaved media elements.
3249         (playbackStateWaiting): Static string accessor.
3250         (playbackStatePlaying): Ditto.
3251         (playbackStateEnded): Ditto.
3252         (MediaController::playbackState): Added. Returns string value of
3253             m_playbackState.
3254         * html/MediaController.h:
3255         * html/MediaController.idl:
3256
3257 2012-11-30  Julien Chaffraix  <jchaffraix@webkit.org>
3258
3259         [CSS Grid Layout] Align the grid track code with the specification's production rules
3260         https://bugs.webkit.org/show_bug.cgi?id=103703
3261
3262         Reviewed by Alexis Menard.
3263
3264         In order to support more of the syntax and make the code more readable, this change
3265         splits following the grammar's production rules (see
3266         http://dev.w3.org/csswg/css3-grid-layout/#grid-definition-columns-and-grid-definit).
3267
3268         Refactoring covered by existing tests.
3269
3270         * css/CSSComputedStyleDeclaration.cpp:
3271         (WebCore::valueForGridTrackMinMax):
3272         (WebCore::valueForGridTrackGroup):
3273         (WebCore::valueForGridTrackList):
3274         * css/CSSParser.cpp:
3275         (WebCore::CSSParser::parseGridTrackList):
3276         (WebCore::CSSParser::parseGridTrackGroup):
3277         (WebCore::CSSParser::parseGridTrackMinMax):
3278         * css/CSSParser.h:
3279         * css/StyleResolver.cpp:
3280         (WebCore::createGridTrackMinMax):
3281         (WebCore::createGridTrackGroup):
3282         (WebCore::createGridTrackList):
3283         Mechanical split of the parsing, resolving and computed style code into
3284         <track-list>, <track-group>, <track-minmax> and <track-breadth> parts.
3285
3286         * css/CSSParser.cpp:
3287         (WebCore::CSSParser::parseGridBreadth):
3288         Changed this function to just parse a single value (without any extra logic).
3289
3290         * css/StyleResolver.cpp:
3291         (WebCore::createGridTrackBreadth):
3292         Changed this function to take a Length as it is used to parse a <track-breadth>.
3293         The goal is for it to be the low-level function createGridTrackMinmax will call on
3294         each function parameter.
3295
3296 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
3297
3298         Fix potential crash when canceling animations on renderers with no node
3299         https://bugs.webkit.org/show_bug.cgi?id=103784
3300
3301         Reviewed by Dan Bernstein.
3302
3303         We could crash when tearing down RenderScrollbars because we hit
3304         AnimationController::cancelAnimations() for a renderer with no node.
3305         The assertion already check for a null node, but the line after
3306         does not, so fix that.
3307
3308         I tried to make a test with animations/transitions on a custom scrollbar, but was not able
3309         to get it to crash.
3310
3311         * page/animation/AnimationController.cpp:
3312         (WebCore::AnimationController::cancelAnimations):
3313
3314 2012-11-30  Tim Horton  <timothy_horton@apple.com>
3315
3316         PluginDocument fires didFinishDocumentLoadForFrame upon receiving initial bytes instead of when load completes
3317         https://bugs.webkit.org/show_bug.cgi?id=103702
3318         <rdar://problem/12762534>
3319
3320         Reviewed by Alexey Proskuryakov.
3321
3322         Remove the call to finish() from PluginDocumentParser::appendBytes().
3323
3324         This was introduced in http://trac.webkit.org/changeset/14838, when finish() wouldn't get
3325         called for PluginDocuments any other way. In the time since, DocumentWriter::end() was made
3326         to call finish() anyway, at the correct time (the call from appendBytes makes a PluginDocument
3327         appear to be finished loading after the first bytes are received).
3328
3329         No new tests, because there doesn't seem to be any state in a PluginDocument that can be accessed
3330         from JavaScript to determine whether or not it has finished loading.
3331
3332         * html/PluginDocument.cpp:
3333         (WebCore::PluginDocumentParser::appendBytes):
3334
3335 2012-11-29  Ilya Tikhonovsky  <loislo@chromium.org>
3336
3337         RenderBlock minor clean-up: replace raw pointers with OwnPtrs.
3338         https://bugs.webkit.org/show_bug.cgi?id=103690
3339
3340         Reviewed by Eric Seidel.
3341
3342         raw pointers were replaced with OwnPtrs.
3343         Probably we also gain a small performance improvements because
3344         I replaced get && remove pair with take.
3345
3346         * rendering/RenderBlock.cpp:
3347         (WebCore):
3348         (WebCore::removeBlockFromDescendantAndContainerMaps):
3349         (WebCore::RenderBlock::~RenderBlock):
3350         (WebCore::RenderBlock::addOverflowFromFloats):
3351         (WebCore::RenderBlock::addContinuationWithOutline):
3352         (WebCore::RenderBlock::paintContinuationOutlines):
3353         (WebCore::RenderBlock::insertIntoTrackedRendererMaps):
3354         (WebCore::RenderBlock::removeFromTrackedRendererMaps):
3355         (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
3356         * rendering/RenderBlock.h:
3357         (WebCore):
3358
3359 2012-11-30  Jun Jiang  <jun.a.jiang@intel.com>
3360
3361         WebGL: Add a class to abstract the status of the Image in texImage2D() and texSubImage2D()
3362         https://bugs.webkit.org/show_bug.cgi?id=103606
3363
3364         Reviewed by Kenneth Russell.
3365
3366         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.
3367        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.
3368
3369         No new tests. It is a code refactoring patch.
3370
3371         * html/canvas/WebGLRenderingContext.cpp:
3372         (WebCore):
3373         (WebCore::WebGLRenderingContext::texImage2DImpl):
3374         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
3375         * platform/graphics/GraphicsContext3D.cpp:
3376         (WebCore::GraphicsContext3D::ImageExtractor::ImageExtractor):
3377         (WebCore):
3378         (WebCore::GraphicsContext3D::packImageData):
3379         * platform/graphics/GraphicsContext3D.h:
3380         (WebCore):
3381         (GraphicsContext3D):
3382         (ImageExtractor):
3383         (WebCore::GraphicsContext3D::ImageExtractor::extractSucceeded):
3384         (WebCore::GraphicsContext3D::ImageExtractor::imagePixelData):
3385         (WebCore::GraphicsContext3D::ImageExtractor::imageWidth):
3386         (WebCore::GraphicsContext3D::ImageExtractor::imageHeight):
3387         (WebCore::GraphicsContext3D::ImageExtractor::imageSourceFormat):
3388         (WebCore::GraphicsContext3D::ImageExtractor::imageAlphaOp):
3389         (WebCore::GraphicsContext3D::ImageExtractor::imageSourceUnpackAlignment):
3390         * platform/graphics/NativeImagePtr.h:
3391         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3392         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
3393         (WebCore):
3394         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3395         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3396         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
3397         (WebCore):
3398         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3399         * platform/graphics/clutter/GraphicsContext3DClutter.cpp:
3400         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
3401         (WebCore):
3402         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3403         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3404         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
3405         (WebCore):
3406         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3407         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3408         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
3409         (WebCore):
3410         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3411         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
3412         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
3413         (WebCore):
3414         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3415
3416 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
3417
3418         Make RenderLayer::updateLayerPosition() private
3419         https://bugs.webkit.org/show_bug.cgi?id=102624
3420
3421         Reviewed by Ryosuke Niwa.
3422
3423         Made updateLayerPosition() private. The only external caller was
3424         MouseRelatedEvent::computeRelativePosition(), which has no business updating
3425         layer positions. In fact it had positively dangerous behavior; doing just
3426         a style update without layout, and then calling absoluteToLocal() and walking
3427         layers. Fixed by having it call updateLayoutIgnorePendingStylesheets().
3428         
3429         This revealed a bug where event.offsetX/offsetY could be wrong in some cases.
3430         fast/events/stopPropagation-submit.html does a simulated click (which has
3431         client coordinates at 0,0), so the image submit coordinates were incorrectly
3432         0,0. Now that we do layout before computing them, they are correctly reported
3433         as being relative to the element.
3434
3435         * dom/MouseRelatedEvent.cpp:
3436         (WebCore::MouseRelatedEvent::computeRelativePosition):
3437         * rendering/RenderLayer.cpp:
3438         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
3439         * rendering/RenderLayer.h:
3440         (RenderLayer):
3441
3442 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
3443
3444         Late-loading stylesheets can cause composited layers to be blank
3445         https://bugs.webkit.org/show_bug.cgi?id=103773
3446
3447         Reviewed by Tim Horton.
3448
3449         Early painting can be short-circuited in RenderBlock::paintContents() if we know a stylesheet
3450         is pending, which is done to avoid a flash of unstyled content (FOUC). When the stylesheet
3451         finally loaded, Document::styleResolverChanged() would try to repaint everything by calling
3452         repaint() on the RenderView(). In a composited world, however, this repaint() doesn't repaint
3453         composited layers.
3454         
3455         This was particularly prevalent on this specific URL because it failed to load
3456         a CSS file from typekit.com, so Document::styleResolverChanged()
3457         just did the repaint and returned (rather than doing a recalc style as would
3458         happen for correctly loaded stylesheets).
3459         
3460         Fix by making a way to repaint all compositing layers, and calling it
3461         from Document::styleResolverChanged().
3462
3463         No tests because this is timing-dependant.
3464
3465         * dom/Document.cpp:
3466         (WebCore::Document::styleResolverChanged): Call repaintViewAndCompositedLayers().
3467         * rendering/RenderBlock.cpp:
3468         (WebCore::RenderBlock::paintContents): Fix the comment.
3469         * rendering/RenderLayerCompositor.cpp: Convert repaintCompositedLayersAbsoluteRect()
3470         and associated recursiveRepaintLayerRect() to allow the rect to be null, which indicates
3471         that we should just repaint the entire layer, and improve their names.
3472         (WebCore::RenderLayerCompositor::repaintCompositedLayers):
3473         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
3474         * rendering/RenderLayerCompositor.h:
3475         * rendering/RenderView.cpp:
3476         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): repaintCompositedLayersAbsoluteRect()
3477         was renamed to repaintCompositedLayers().
3478         (WebCore::RenderView::repaintViewAndCompositedLayers):
3479         * rendering/RenderView.h:
3480         (RenderView): repaintViewRectangle() and repaintRectangleInViewAndCompositedLayers() should not
3481         be virtual. Add repaintViewAndCompositedLayers().
3482
3483 2012-11-30  Sheriff Bot  <webkit.review.bot@gmail.com>
3484
3485         Unreviewed, rolling out r136142.
3486         http://trac.webkit.org/changeset/136142
3487         https://bugs.webkit.org/show_bug.cgi?id=103768
3488
3489         break a bunch of interactive_ui_tests in chromium win
3490         (Requested by zhenyao_home on #webkit).
3491
3492         * css/CSSComputedStyleDeclaration.cpp:
3493         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3494         * css/CSSParser.cpp:
3495         (WebCore::isValidKeywordPropertyAndValue):
3496         (WebCore::isKeywordPropertyID):
3497         (WebCore::CSSParser::parseValue):
3498         * css/CSSPrimitiveValueMappings.h:
3499         * css/CSSProperty.cpp:
3500         (WebCore::CSSProperty::isInheritedProperty):
3501         * css/CSSPropertyNames.in:
3502         * css/CSSValueKeywords.in:
3503         * css/StyleBuilder.cpp:
3504         (WebCore::StyleBuilder::StyleBuilder):
3505         * css/StyleResolver.cpp:
3506         (WebCore::StyleResolver::applyProperty):
3507         * rendering/InlineFlowBox.cpp:
3508         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3509         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
3510         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
3511         * rendering/RenderRubyRun.cpp:
3512         (WebCore::RenderRubyRun::layout):
3513         * rendering/style/RenderStyle.cpp:
3514         (WebCore::RenderStyle::diff):
3515         * rendering/style/RenderStyle.h:
3516         * rendering/style/RenderStyleConstants.h:
3517         * rendering/style/StyleRareInheritedData.cpp:
3518         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3519         (WebCore::StyleRareInheritedData::operator==):
3520         * rendering/style/StyleRareInheritedData.h:
3521         (StyleRareInheritedData):
3522
3523 2012-11-30  Joshua Bell  <jsbell@chromium.org>
3524
3525         IndexedDB: Replace use of ScriptExecutionContext::Task (Part 1)
3526         https://bugs.webkit.org/show_bug.cgi?id=101483
3527
3528         Reviewed by Tony Chang.
3529
3530         The IDB back end (which runs on a single thread) makes use of ScriptExecutionContext's
3531         Task and facilities for cross-task posting with callbacks, and requires decorating various
3532         IDB classes with "ThreadSafe" when they are not. Move towards encapsulating the tasks
3533         in "Operation" classes which are IDB-operation specific.
3534
3535         Part 1 (this patch) retains the use of ScriptExecutionContext::Task but wraps the creation
3536         and the callback function in an Operation class which will be fleshed out in later patches.
3537         As an aside, a little bit of RefPtr churn is eliminated, and IDB_TRACE sprinkled in.
3538
3539         No new tests - just a refactor.
3540
3541         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
3542         (IDBCursorBackendImpl::CursorIterationOperation):
3543         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::create):
3544         (WebCore):
3545         (IDBCursorBackendImpl::CursorAdvanceOperation):
3546         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::create):
3547         (IDBCursorBackendImpl::CursorPrefetchIterationOperation):
3548         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::create):
3549         (WebCore::IDBCursorBackendImpl::continueFunction):
3550         (WebCore::IDBCursorBackendImpl::advance):
3551         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::perform):
3552         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::perform):
3553         (WebCore::IDBCursorBackendImpl::prefetchContinue):
3554         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
3555         * Modules/indexeddb/IDBCursorBackendImpl.h:
3556         (IDBCursorBackendImpl):
3557         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3558         (IDBDatabaseBackendImpl::CreateObjectStoreOperation):
3559         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::create):
3560         (WebCore):
3561         (IDBDatabaseBackendImpl::DeleteObjectStoreOperation):
3562         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::create):
3563         (IDBDatabaseBackendImpl::VersionChangeOperation):
3564         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
3565         (IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation):
3566         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::create):
3567         (IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation):
3568         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::create):
3569         (IDBDatabaseBackendImpl::VersionChangeAbortOperation):
3570         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
3571         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
3572         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
3573         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
3574         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
3575         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
3576         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
3577         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::perform):
3578         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::perform):
3579         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
3580         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3581         (IDBDatabaseBackendImpl):
3582         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
3583         (IDBIndexBackendImpl::OpenIndexCursorOperation):
3584         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::create):
3585         (WebCore):
3586         (IDBIndexBackendImpl::IndexCountOperation):
3587         (WebCore::IDBIndexBackendImpl::IndexCountOperation::create):
3588         (IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation):
3589         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::create):
3590         (IDBIndexBackendImpl::IndexValueRetrievalOperation):
3591         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::create):
3592         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::perform):
3593         (WebCore::IDBIndexBackendImpl::openCursor):
3594         (WebCore::IDBIndexBackendImpl::openKeyCursor):
3595         (WebCore::IDBIndexBackendImpl::IndexCountOperation::perform):
3596         (WebCore::IDBIndexBackendImpl::count):
3597         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
3598         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::perform):
3599         (WebCore::IDBIndexBackendImpl::get):
3600         (WebCore::IDBIndexBackendImpl::getKey):
3601         * Modules/indexeddb/IDBIndexBackendImpl.h:
3602         (WebCore::IDBIndexBackendImpl::metadata):
3603         (IDBIndexBackendImpl):
3604         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3605         (IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation):
3606         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::create):
3607         (WebCore):
3608         (IDBObjectStoreBackendImpl::ObjectStoreStorageOperation):
3609         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::create):
3610         (IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation):
3611         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::create):
3612         (IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation):
3613         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::create):
3614         (IDBObjectStoreBackendImpl::ObjectStoreClearOperation):
3615         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::create):
3616         (IDBObjectStoreBackendImpl::CreateIndexOperation):
3617         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::create):
3618         (IDBObjectStoreBackendImpl::DeleteIndexOperation):
3619         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::create):
3620         (IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation):
3621         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::create):
3622         (IDBObjectStoreBackendImpl::ObjectStoreCountOperation):
3623         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::create):
3624         (IDBObjectStoreBackendImpl::CreateIndexAbortOperation):
3625         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::create):
3626         (IDBObjectStoreBackendImpl::DeleteIndexAbortOperation):
3627         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::create):
3628         (WebCore::IDBObjectStoreBackendImpl::get):
3629         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
3630         (WebCore::IDBObjectStoreBackendImpl::put):
3631         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
3632         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::perform):
3633         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
3634         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
3635         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::perform):
3636         (WebCore::IDBObjectStoreBackendImpl::clear):
3637         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::perform):
3638         (WebCore::IDBObjectStoreBackendImpl::createIndex):
3639         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
3640         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
3641         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::perform):
3642         (WebCore::IDBObjectStoreBackendImpl::openCursor):
3643         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::perform):
3644         (WebCore::IDBObjectStoreBackendImpl::count):
3645         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::perform):
3646         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::perform):
3647         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::perform):
3648         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
3649         (IDBObjectStoreBackendImpl):
3650
3651 2012-11-30  Tim Horton  <timothy_horton@apple.com>
3652
3653         (Simple)PDFPlugin: Support conversion of PostScript documents
3654         https://bugs.webkit.org/show_bug.cgi?id=103289
3655         <rdar://problem/10235708>
3656
3657         Reviewed by Dan Bernstein.
3658
3659         SimplePDFPlugin (and PDFPlugin) should support converting PostScript files
3660         to PDF before handing them off to their respective backends.
3661
3662         * English.lproj/Localizable.strings:
3663         * WebCore.exp.in:
3664         * platform/LocalizedStrings.cpp:
3665         (WebCore::postScriptDocumentTypeDescription):
3666         * platform/LocalizedStrings.h:
3667         Add and export postScriptDocumentTypeDescription, for PostScript files.
3668
3669 2012-11-30  Justin Novosad  <junov@google.com>
3670
3671         [Chromium] Animation updates fail when using a canvas as a CSS backround-image style with -webkit-canvas
3672         https://bugs.webkit.org/show_bug.cgi?id=103643
3673
3674         Reviewed by Stephen White.
3675
3676         CanvasRenderingContext2D::didDraw was not propagating the change
3677         notification to observers in the accelerated compositing case.
3678         Problem fixed by adding observer notifications.
3679
3680         New manual test: animated-canvas-as-background.html
3681
3682         * html/HTMLCanvasElement.cpp:
3683         (WebCore::HTMLCanvasElement::didDraw):
3684         The observer notification was factored out into a separate method
3685         so that it can be invoked directly for accelerated compositing.
3686         (WebCore):
3687         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
3688         * html/HTMLCanvasElement.h:
3689         (HTMLCanvasElement):
3690         * html/canvas/CanvasRenderingContext2D.cpp:
3691         (WebCore::CanvasRenderingContext2D::didDraw):
3692         Added observer notification call to trigger repainting of elements that
3693         use this canvas for their style.
3694
3695 2012-11-30  James Simonsen  <simonjam@chromium.org>
3696
3697         Report CSS as initiator instead of elements, except body
3698         https://bugs.webkit.org/show_bug.cgi?id=103546
3699
3700         Reviewed by Tony Gentilcore.
3701
3702         The Resource Timing spec says the initiator should be "css" when the the load comes from a
3703         url() rule in a stylesheet. Separately, WebKit reports <body background> as a CSS load, we
3704         need to override that to match the spec.
3705
3706         Tests: http/tests/w3c/webperf/submission/resource-timing
3707
3708         * css/CSSCursorImageValue.cpp:
3709         (WebCore::CSSCursorImageValue::cachedImage):
3710         * css/CSSImageValue.cpp:
3711         (WebCore::CSSImageValue::cachedImage): By default, the initiator is "css".
3712         * css/CSSImageValue.h:
3713         (CSSImageValue):
3714         (WebCore::CSSImageValue::setInitiator): Allow users to manually override it (see body).
3715         * css/StyleResolver.cpp:
3716         (WebCore::StyleResolver::loadPendingImage):
3717         * html/HTMLBodyElement.cpp:
3718         (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute): Record "body" as the initiator.
3719
3720 2012-11-30  James Simonsen  <simonjam@chromium.org>
3721
3722         Remember the CachedResourceRequest for preloads
3723         https://bugs.webkit.org/show_bug.cgi?id=102995
3724
3725         Reviewed by Tony Gentilcore.
3726
3727         Without this, the initiator is lost.
3728
3729         Tests: http/tests/w3c/webperf/submission/resource-timing
3730
3731         * loader/cache/CachedResourceLoader.cpp:
3732         (WebCore::CachedResourceLoader::requestResource):
3733         (WebCore::CachedResourceLoader::loadResource):
3734         (WebCore::CachedResourceLoader::preload):
3735         (WebCore::CachedResourceLoader::checkForPendingPreloads):
3736         (WebCore::CachedResourceLoader::requestPreload):
3737         (WebCore::CachedResourceLoader::isPreloaded):
3738         * loader/cache/CachedResourceLoader.h:
3739         (CachedResourceLoader):
3740         (PendingPreload):
3741
3742 2012-11-30  Michelangelo De Simone  <michelangelo@webkit.org>
3743
3744         [CSS Shaders] Clamp input colors before blending
3745         https://bugs.webkit.org/show_bug.cgi?id=98962
3746
3747         Reviewed by Dean Jackson.
3748
3749         The result of css_ColorMatrix multiplication is now clamped in [0.0, 1.0]
3750         before the blending step.
3751
3752         Relevant spec section is:
3753         http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#shader-processing-model
3754
3755         Tests: css3/filters/custom/custom-filter-color-clamping-negative.html
3756                css3/filters/custom/custom-filter-color-clamping.html
3757
3758         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
3759         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader): Added clamping
3760         code.
3761
3762 2012-11-30  Abhishek Arya  <inferno@chromium.org>
3763
3764         Crash due to intruding float not removed after writing mode changed.
3765         https://bugs.webkit.org/show_bug.cgi?id=100149
3766
3767         Reviewed by Levi Weintraub.
3768
3769         When RenderView writing mode changes, make sure to mark all descendants
3770         with floats for layout.
3771
3772         Test: fast/block/float/intruding-float-not-removed-writing-mode.xhtml
3773
3774         * rendering/RenderBox.cpp:
3775         (WebCore::RenderBox::styleDidChange):
3776
3777 2012-11-30  Florin Malita  <fmalita@chromium.org>
3778
3779         SVG pattern data deleted while in use
3780         https://bugs.webkit.org/show_bug.cgi?id=103415
3781
3782         Reviewed by Dirk Schulze.
3783
3784         Various calls in RenderSVGResourcePattern::applyResource() can trigger invalidations,
3785         which may end up deleting our current pattern data (via removeAllClientsFromCache).
3786         To avoid this, we should add the pattern data to the cache only after it is fully built.
3787         For clarity, the patch also refactors the pattern setup code into a separate method.
3788
3789         Test: svg/custom/large-image-pattern-crash.html
3790
3791         * rendering/svg/RenderSVGResourcePattern.cpp:
3792         (WebCore::RenderSVGResourcePattern::buildPattern):
3793         (WebCore::RenderSVGResourcePattern::applyResource):
3794         * rendering/svg/RenderSVGResourcePattern.h:
3795         (RenderSVGResourcePattern):
3796
3797 2012-11-30  Alexander Pavlov  <apavlov@chromium.org>
3798
3799         Web Inspector: It's Sass, not SASS
3800         https://bugs.webkit.org/show_bug.cgi?id=103626
3801
3802         Reviewed by Yury Semikhatsky.
3803
3804         Change "SASS" to "Sass" in UI strings.
3805
3806         * English.lproj/localizedStrings.js:
3807         * inspector/front-end/Settings.js:
3808         (WebInspector.ExperimentsSettings):
3809         * inspector/front-end/SettingsScreen.js:
3810
3811 2012-11-29  Tommy Widenflycht  <tommyw@google.com>
3812
3813         Speech Recognition API: Update SpeechRecognitionEvent/Result to match the specification
3814         https://bugs.webkit.org/show_bug.cgi?id=103407
3815
3816         Reviewed by Adam Barth.
3817
3818         This patch does the following:
3819         o Adds results, and removing result on SpeechRecognitionEvent
3820         o Renaming SpeechRecognitionResult::final to isFinal
3821         o Moving emma to SpeechRecognitionEvent from SpeechRecognitionResult
3822
3823         Existing tests updated to test the new API.
3824
3825         * Modules/speech/SpeechRecognition.cpp:
3826         (WebCore::SpeechRecognition::start):
3827         (WebCore::SpeechRecognition::didReceiveResults):
3828         (WebCore):
3829         * Modules/speech/SpeechRecognition.h:
3830         (SpeechRecognition):
3831         * Modules/speech/SpeechRecognitionEvent.cpp:
3832         (WebCore::SpeechRecognitionEvent::createResult):
3833         (WebCore):
3834         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
3835         (WebCore::SpeechRecognitionEvent::~SpeechRecognitionEvent):
3836         (WebCore::emmaQualifiedName):
3837         (WebCore::SpeechRecognitionEvent::emma):
3838         * Modules/speech/SpeechRecognitionEvent.h:
3839         (WebCore):
3840         (SpeechRecognitionEventInit):
3841         (SpeechRecognitionEvent):
3842         (WebCore::SpeechRecognitionEvent::resultIndex):
3843         (WebCore::SpeechRecognitionEvent::results):
3844         * Modules/speech/SpeechRecognitionEvent.idl:
3845         * Modules/speech/SpeechRecognitionResult.cpp:
3846         * Modules/speech/SpeechRecognitionResult.h:
3847         (WebCore::SpeechRecognitionResult::isFinal):
3848         (SpeechRecognitionResult):
3849         * Modules/speech/SpeechRecognitionResult.idl:
3850         * WebCore.gypi:
3851         * bindings/v8/custom/V8SpeechRecognitionEventCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp.
3852         (WebCore):
3853         (WebCore::V8SpeechRecognitionEvent::opaqueRootForGC):
3854
3855 2012-11-30  Simon Hausmann  <simon.hausmann@digia.com>, Pierre Rossi  <pierre.rossi@digia.com>
3856
3857         [Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
3858         https://bugs.webkit.org/show_bug.cgi?id=99314
3859
3860         Reviewed by Tor Arne Vestbø.
3861
3862         This big change separates QtWebKit into QtWebKit and QtWebKitWidgets as
3863         shared libraries.
3864
3865         It's a big refactoring that mostly involves moving WebCore dependent
3866         code into QtWebKit and accessing it through exported QWebFrameAdapter
3867         and QWebPageAdapter classes.
3868
3869         * Target.pri:
3870         * platform/qt/QStyleFacade.h: Get rid of styleForPage function, not needed
3871         anymore.
3872         * platform/qt/QWebPageClient.h:
3873         (QWebPageClient): Remove a whole lot of cruft in favour of a simple GL enabling
3874         callback to select the GL texture mapper.
3875         (QWebPageClient::makeOpenGLContextCurrentIfAvailable):
3876
3877 2012-11-30  Simon Hausmann  <simon.hausmann@digia.com>
3878
3879         Unreviewed, rolling out r136227.
3880         http://trac.webkit.org/changeset/136227
3881
3882         Broke the Qt bots due to version mismatch
3883
3884         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
3885         (FullScreenVideoWindow::FullScreenVideoWindow):
3886         (PlatformVideoWindow::PlatformVideoWindow):
3887
3888 2012-11-30  Samuel Rødal  <samuel.rodal@digia.com>
3889
3890         [Qt] Fixed use of to-be-removed compatibility functions in QWindow.
3891
3892         Reviewed by Simon Hausmann.
3893
3894         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
3895         (FullScreenVideoWindow::FullScreenVideoWindow):
3896         (PlatformVideoWindow::PlatformVideoWindow):
3897
3898 2012-11-30  Arpita Bahuguna  <arpitabahuguna@gmail.com>
3899
3900         Caret is painted horizontally in vertical writing mode when there are no visible text
3901         https://bugs.webkit.org/show_bug.cgi?id=102359
3902
3903         Reviewed by Ryosuke Niwa.
3904
3905         In the vertical writing mode the caret rect on an empty editable box or
3906         an empty line is rendered as per the horizontal writing mode.
3907
3908         This changes though when any text is added; the caret is then displayed
3909         in accordance with the vertical writing mode.
3910
3911         Test: editing/selection/caret-alignment-for-vertical-text.html
3912
3913         * rendering/RenderBox.cpp:
3914         (WebCore::RenderBox::localCaretRect):
3915         * rendering/RenderBoxModelObject.cpp:
3916         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
3917         The caret rect should be transposed for the vertical writing mode. Its
3918         width and height values need to be interchanged for it to be oriented
3919         as per the vertical text.
3920
3921 2012-11-30  Sankeerth V S  <sankeerth.vs@samsung.com>
3922
3923         Web Inspector: [Timeline] JS error when clicking in Memory Statistics view
3924         https://bugs.webkit.org/show_bug.cgi?id=103486
3925
3926         Reviewed by Alexander Pavlov.
3927
3928         The counter value can be null/undefined. Hence a check is needed
3929         before we access the "time" property on this counter object.
3930
3931         No new tests required as UI related change.
3932
3933         * inspector/front-end/MemoryStatistics.js:
3934         (WebInspector.MemoryStatistics.prototype._onClick):
3935
3936 2012-11-30  Kent Tamura  <tkent@chromium.org>
3937
3938         Fix typos in DateTimeNumericFieldElement.cpp and DateTimeSymbolicFieldElement.cpp
3939         https://bugs.webkit.org/show_bug.cgi?id=103717
3940
3941         Reviewed by Hajime Morita.
3942
3943         * html/shadow/DateTimeNumericFieldElement.cpp:
3944         (WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
3945         maximum, not maxium.
3946         * html/shadow/DateTimeSymbolicFieldElement.cpp:
3947         (WebCore::DateTimeSymbolicFieldElement::customStyleForRenderer): Ditto.
3948
3949 2012-11-30  Halton Huo  <halton.huo@intel.com>
3950
3951         [EFL] libwebcore_efl.a fail to link when enable webgl
3952         https://bugs.webkit.org/show_bug.cgi?id=103610
3953
3954         Reviewed by Gyuyoung Kim.
3955
3956         libwebcore_efl.a should link to X11, Xcomposite and Xrender libraries when ENABLE_WEBGL is ON
3957
3958         No new tests, no behavior change for layout tests.
3959
3960         * PlatformEfl.cmake: Append ${X11_X11_LIB}, ${X11_Xcomposite_LIB} and ${X11_Xrender_LIB} to WebCore_LIBRARIES
3961
3962 2012-11-30  Tim Horton  <timothy_horton@apple.com>
3963
3964         Unreviewed, fix the PDFPlugin build after http://trac.webkit.org/changeset/136205.
3965
3966         * WebCore.xcodeproj/project.pbxproj:
3967
3968 2012-11-30  Mihai Maerean  <mmaerean@adobe.com>
3969
3970         [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
3971         https://bugs.webkit.org/show_bug.cgi?id=101192
3972
3973         Reviewed by Hajime Morita.
3974
3975         Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
3976
3977         Tests: No new tests because there is no functional change.
3978
3979         * WebCore.exp.in:
3980         * WebCore.vcproj/copyForwardingHeaders.cmd:
3981         * WebCore.xcodeproj/project.pbxproj:
3982         * bindings/generic/RuntimeEnabledFeatures.cpp:
3983         (WebCore):
3984         * bindings/generic/RuntimeEnabledFeatures.h:
3985         (RuntimeEnabledFeatures):
3986         (WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
3987         (WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):
3988         * dom/Document.cpp:
3989         (WebCore::Document::cssRegionsEnabled):
3990         * page/Settings.cpp:
3991         (WebCore::Settings::Settings):
3992         * page/Settings.h:
3993         (Settings):
3994
3995 2012-11-29  Martin Robinson  <mrobinson@igalia.com>
3996
3997         [GTK] [WebKit2] WebKitWebViewBase creates a GL context for the redirected XComposite window crashing WebKit in Xvfb
3998         https://bugs.webkit.org/show_bug.cgi?id=103476
3999
4000         Reviewed by Alejandro G. Castro.
4001
4002         Allow creation of RedirectedXCompositeWindow in a mode which does not have a backing
4003         GLContext. For WebKit2 the GLContext is always in the WebProcess. Creating the GLContext
4004         in both processes can cause crashes when library is run in Xvfb.
4005
4006         No new tests. This fixes a crash running tests on some systems.
4007
4008         * platform/gtk/RedirectedXCompositeWindow.cpp:
4009         (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
4010         (WebCore::RedirectedXCompositeWindow::resize): Do not create the GLContext when
4011         in the new no-GLContext mode.
4012         (WebCore::RedirectedXCompositeWindow::context): ASSERT that we are not in
4013         no-GLContext mode.
4014
4015 2012-11-29  Keishi Hattori  <keishi@webkit.org>
4016
4017         Better type ahead for DateTimeSymbolicFieldElement
4018         https://bugs.webkit.org/show_bug.cgi?id=103031
4019
4020         Reviewed by Kent Tamura.
4021
4022         This cuts out the type ahead code that will be used by HTMLSelectElement
4023         and DateTimeSymbolicFieldElement into a TypeAhead class. This will
4024         improve DateTimeSymbolicFieldElement type ahead which was first
4025         character match only, by adding cycling, prefix match and index number
4026         match.
4027
4028         Added tests to month-multiple-fields-keyboard-events.html.
4029
4030         * GNUmakefile.list.am: Added TypeAhead.{h,cpp}
4031         * Target.pri: Ditto.
4032         * WebCore.gypi: Ditto.
4033         * WebCore.vcproj/WebCore.vcproj: Ditto.
4034         * WebCore.xcodeproj/project.pbxproj: Ditto.
4035         * CMakeLists.txt: Ditto.
4036         * html/HTMLSelectElement.cpp:
4037         (WebCore):
4038         (WebCore::HTMLSelectElement::HTMLSelectElement):
4039         (WebCore::HTMLSelectElement::indexOfSelectedOption): Returns index of current selection.
4040         (WebCore::HTMLSelectElement::optionCount): Returns total number of options.
4041         (WebCore::HTMLSelectElement::optionAtIndex): Returns option at index.
4042         (WebCore::HTMLSelectElement::typeAheadFind): Use TypeAhead.
4043         * html/HTMLSelectElement.h:
4044         (HTMLSelectElement):
4045         * html/TypeAhead.cpp: Added.
4046         (WebCore):
4047         (WebCore::TypeAhead::TypeAhead):
4048         (WebCore::stripLeadingWhiteSpace): Moved from HTMLSelectElement.cpp.
4049         (WebCore::TypeAhead::handleEvent): Returns index for match.
4050