4.68MB below RenderStyle::filter() on Membuster3.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-08  Andreas Kling  <kling@webkit.org>
2
3         4.68MB below RenderStyle::filter() on Membuster3.
4         <http://webkit.org/b/101624>
5         <rdar://problem/12663822>
6
7         Reviewed by Darin Adler.
8
9         Rename the non-const RenderStyle::filter() to mutableFilter() since using it causes us to detach
10         from the rare non-inherited data (copy-on-write.)
11         Most call sites were calling filter() on a RenderStyle* which was causing the bloat.
12
13         4.68MB progression on Membuster3.
14
15         * css/StyleResolver.cpp:
16         (WebCore::StyleResolver::loadPendingSVGDocuments):
17         (WebCore::StyleResolver::loadPendingShaders):
18         * rendering/style/RenderStyle.h:
19
20 2012-11-08  Alexey Proskuryakov  <ap@apple.com>
21
22         Create loader/blackberry directory, because svn-apply cannot apply a patch that
23         creates a directory and moves a file into it.
24
25         * loader/blackberry: Added.
26
27 2012-11-08  Geoffrey Garen  <ggaren@apple.com>
28
29         Mac build fix: Mark WidthCache.h 'private' so WebKit can use it.
30
31         Not reviewed.
32
33         * WebCore.xcodeproj/project.pbxproj:
34
35 2012-11-05  Geoffrey Garen  <ggaren@apple.com>
36
37         Optimized kerning and ligatures using caching
38         https://bugs.webkit.org/show_bug.cgi?id=101269
39
40         Reviewed by Dan Bernstein.
41
42         Consider three kinds of text layout, and the value of caching for each:
43
44             (1) 1 layout of 100% unique words: small negative value.
45
46             (2) 1 layout of English prose: medium positive value.
47
48             (3) Many layouts of anything: extra-extra-large positive value.
49
50         Since we can't distinguish betwen these workflows a priori, we use statistical
51         sampling. To minimize cost in (1) and maximize benefit in (2) and (3), we treat
52         each cache access as a statistical sample, and use the cache in proportion to
53         the observed probability of duplicate text measurement.
54
55         Benchmark results:
56             plt3: 1% faster
57             chapter-reflow-once-random: No change [*]
58             chapter-reflow-once: 23% faster
59             chapter-reflow-twice: 52% faster
60             chapter-reflow-thrice: 68% faster
61             chapter-reflow: 263% faster
62             line-layout: 270% faster
63
64             [*] This is a stress test designed to make everything go wrong for
65             caching. It does not represent real world content.
66
67         * GNUmakefile.list.am:
68         * Target.pri:
69         * WebCore.vcproj/WebCore.vcproj:
70         * WebCore.xcodeproj/project.pbxproj:
71         * platform/graphics/WidthCache.h: Added.
72
73         (WidthCache): Added a class that caches common word widths. This cache
74         could cache more things or more cases in future -- but for now it seems
75         to cover the common cases.
76
77         (SmallStringKey): Early profiling showed that allocating an AtomicString
78         or String measurably added to the cost of the cache, so I added a custom
79         string key that can be stored directly inside the table by value --
80         empirically answering an age-old question with which Apple WebKit engineers
81         seem to be obsessed.
82
83         (WebCore::WidthCache::SmallStringKey::capacity):
84         (WebCore::WidthCache::SmallStringKey::SmallStringKey):
85         (WebCore::WidthCache::SmallStringKey::characters):
86         (WebCore::WidthCache::SmallStringKey::length):
87         (WebCore::WidthCache::SmallStringKey::hash):
88         (WebCore::WidthCache::SmallStringKey::isHashTableDeletedValue):
89         (WebCore::WidthCache::SmallStringKey::isHashTableEmptyValue):
90         (WebCore::WidthCache::SmallStringKeyHash::hash):
91         (WebCore::WidthCache::SmallStringKeyHash::equal):
92         (SmallStringKeyHash):
93         (SmallStringKeyHashTraits):
94         (WebCore::WidthCache::SmallStringKeyHashTraits::isEmptyValue): Ditto.
95
96         (WebCore::WidthCache::WidthCache):
97         (WebCore::WidthCache::add): Separate out the "don't use the cache" case
98         so the compiler can inline it separate, hopefully further reducing cases
99         of (1).
100
101         (WebCore::WidthCache::addSlowCase): There's a little subtlety to the
102         sampling policy here. Lots of different approaches are possible, and I
103         just picked a simple one that seemed to work based on benchmarking. I'll
104         point out some interesting sublteties I'm aware of here:
105
106             (*) Since we start at the min sampling rate, a font used for 20 words
107             or fewer never allocates a cache. Anecdotally, some fonts seem to
108             be used this way.
109
110             (*) When the sampling rate is x / y, sampling all x words in a row
111             seems smart because some words may occur more commonly in relation to
112             each other (such as 'each' and 'other'), and repeat workloads will
113             lay out the same words in order. Intuitively, these are both reasons
114             this policy may ramp up more effectively under load.
115
116             (*) I opted for linear back-off instead of, say, exponential back-off
117             because we're not trying to back off to infinity -- just to our min
118             sampling rate. Since we don't expect the cache to hit for every word,
119             my guess is that exponential back-off would be too aggressive.
120
121             (*) Our "eviction" policy has an IQ of 1. I expect this is sufficient
122             because it would be surprising to see a million unique words all used
123             in the same document. (I would not like to play a Letterpress game
124             against such a document.)
125
126         (WebCore::WidthCache::clear): Needed because a font can change, in which
127         case we need to ditch its cache.
128
129         (WebCore::operator==): Needed for hashing.
130
131 2012-11-08  Andrey Kosyakov  <caseq@chromium.org>
132
133         Web Inspector: show statistics over selected frame range in Timeline's Frame mode
134         https://bugs.webkit.org/show_bug.cgi?id=101593
135
136         Reviewed by Pavel Feldman.
137
138         - change status bar records counter wording to "N of M frames|records shown" depending on mode;
139         - append average frame length and & stddev in frame mode;
140         - expand the above to a popover that includes frame count, range duration and min/avg/max/stddev on frame length;
141         - show frame bars & dividers iff selection range includes < 30 frames (drive-by)
142
143         * English.lproj/localizedStrings.js:
144         * inspector/front-end/TimelineFrameController.js:
145         (WebInspector.FrameStatistics):
146         * inspector/front-end/TimelineModel.js:
147         (WebInspector.TimelineModel.aggregateTimeByCategory):
148         * inspector/front-end/TimelinePanel.js:
149         (WebInspector.TimelinePanel.prototype.get statusBarItems):
150         (WebInspector.TimelinePanel.prototype._createStatusBarItems.getAnchor):
151         (WebInspector.TimelinePanel.prototype._createStatusBarItems):
152         (WebInspector.TimelinePanel.prototype._updateRecordsCounter):
153         (WebInspector.TimelinePanel.prototype._updateFrameStatistics):
154         (WebInspector.TimelinePanel.prototype._showFrameStatistics):
155         (WebInspector.TimelinePanel.prototype._updateFrameBars):
156         (WebInspector.TimelinePanel.prototype._overviewModeChanged.set if):
157         (WebInspector.TimelinePanel.prototype._overviewModeChanged):
158         (WebInspector.TimelinePanel.prototype._refresh):
159         * inspector/front-end/TimelinePresentationModel.js:
160         (WebInspector.TimelinePresentationModel.prototype.):
161         (WebInspector.TimelinePresentationModel.prototype.compareEndTime):
162         (WebInspector.TimelinePresentationModel.prototype.filteredFrames):
163         (WebInspector.TimelinePresentationModel.generatePopupContentForFrameStatistics):
164         * inspector/front-end/timelinePanel.css:
165         (.timeline-records-stats, .storage-application-cache-status, .storage-application-cache-connectivity):
166         (.timeline-records-stats):
167         (.timeline-frames-stats):
168
169 2012-11-08  Jakob Petsovits  <jpetsovits@rim.com>
170
171         [BlackBerry] Rework the API to use document coordinates
172         https://bugs.webkit.org/show_bug.cgi?id=101608
173         RIM PR 173292
174
175         Reviewed by Adam Treat.
176
177         Provide a better API for WebPage to relay.
178         See Source/WebKit/blackberry/ChangeLog for details.
179
180         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
181         (WebCore::MediaPlayerPrivate::getWindowScreenRect):
182         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
183         (Platform):
184         (BlackBerry):
185         (MediaPlayerPrivate):
186
187 2012-11-08  Sheriff Bot  <webkit.review.bot@gmail.com>
188
189         Unreviewed, rolling out r133892.
190         http://trac.webkit.org/changeset/133892
191         https://bugs.webkit.org/show_bug.cgi?id=101617
192
193         Compile failures on mac, android, linux (Requested by
194         jsbell|gardener on #webkit).
195
196         * bindings/v8/DOMDataStore.cpp:
197         (WebCore::DOMDataStore::current):
198         * bindings/v8/DOMWrapperWorld.h:
199         (WebCore::DOMWrapperWorld::domDataStore):
200         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
201         * bindings/v8/V8DOMWrapper.h:
202         (WebCore::V8DOMWrapper::getCachedWrapper):
203
204 2012-11-08  Andrey Adaikin  <aandrey@chromium.org>
205
206         Web Inspector: [Canvas] UI iterations: image on the top, auto replay
207         https://bugs.webkit.org/show_bug.cgi?id=101584
208
209         Reviewed by Pavel Feldman.
210
211         * inspector/front-end/CanvasProfileView.js:
212         (WebInspector.CanvasProfileView):
213         (WebInspector.CanvasProfileView.prototype._showTraceLog):
214         (WebInspector.CanvasProfileView.prototype._onTraceLogItemClick):
215         (WebInspector.CanvasProfileView.prototype._replayTraceLog.didReplayTraceLog):
216         (WebInspector.CanvasProfileView.prototype._replayTraceLog):
217         * inspector/front-end/canvasProfiler.css:
218         (.canvas-trace-log):
219         (#canvas-replay-image-container):
220         (#canvas-replay-image):
221
222 2012-11-08  Wei Fanzhe  <whyer1@gmail.com>
223
224         While absolute positioning is put before the first flexitem, flexitems will move to a new line.
225         https://bugs.webkit.org/show_bug.cgi?id=101294
226
227         Reviewed by Ojan Vafai.
228
229         This issue has to do with RenderFlexibleBox::computeNextFlexLine. When determing line breaks, the algorithm sees if 1) the total width exceeds lineBreakLength and 2) whether orderedChildren is non-empty.  But then, if the total width exceeds lineBreakLength and there's only absolutely positioned elemments in orderedChildren then the conditions are met and the algorithm mistakenly breaks the line. The solution is to see if orderedChildren collects at least a flex item. If it does, break the line.  
230
231         * rendering/RenderFlexibleBox.cpp:
232         (WebCore::RenderFlexibleBox::computeNextFlexLine):
233
234 2012-11-08  Dimitri Glazkov  <dglazkov@chromium.org>
235
236         Unreviewed, rolling out r133429.
237         http://trac.webkit.org/changeset/133429
238         https://bugs.webkit.org/show_bug.cgi?id=101173
239
240         Speculative roll out, investigating perf regression.
241
242         * dom/ContextFeatures.cpp:
243         * dom/ContextFeatures.h:
244         * dom/Position.cpp:
245         (WebCore::Position::Position):
246         (WebCore::Position::findParent):
247         * dom/TreeScope.cpp:
248         (WebCore::TreeScope::getSelection):
249         * html/HTMLTagNames.in:
250         * html/shadow/HTMLContentElement.cpp:
251         (WebCore::HTMLContentElement::contentTagName):
252         * page/DOMWindow.idl:
253
254 2012-11-07  Emil A Eklund  <eae@chromium.org>
255
256         Fix enclosingLayoutRect calls in InlineFlowBox.h
257         https://bugs.webkit.org/show_bug.cgi?id=101497
258
259         Reviewed by Levi Weintraub.
260
261         InlineFlowBox.h used to include LayoutTypesInlineMethods.h which
262         overrid enclosingLayoutRect to call closingIntRect. When we
263         removed the LayoutTypes abstraction we switched these to
264         enclosingIntRect to preserve the behavior.
265         This patch changes these back to enclosingLayoutRect which is
266         the desired behavior.
267
268         Covered by existing tests.
269
270         * rendering/InlineFlowBox.h:
271         (WebCore::InlineFlowBox::layoutOverflowRect):
272         (WebCore::InlineFlowBox::visualOverflowRect):
273
274 2012-11-08  Philip Rogers  <pdr@google.com>
275
276         Remove unnecessary save/restore in SVGTextRunRenderingContext
277         https://bugs.webkit.org/show_bug.cgi?id=101546
278
279         Reviewed by Andreas Kling.
280
281         This patch removes an unnecessary context save/restore SVGTextRunRenderingContext by
282         refactoring the code to save off the stroke thickness.
283
284         No new tests as this is heavily covered by existing tests.
285
286         * rendering/svg/SVGTextRunRenderingContext.cpp:
287         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
288
289 2012-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>
290
291         [GTK] Clean up includes in GObject DOM bindings code
292         https://bugs.webkit.org/show_bug.cgi?id=101077
293
294         Reviewed by Kentaro Hara.
295
296         Remove some headers included multiple times for the same file and
297         fix consistency in the includes style.
298
299         * bindings/gobject/DOMObjectCache.cpp:
300         * bindings/gobject/GObjectEventListener.cpp:
301         * bindings/gobject/GObjectEventListener.h:
302         * bindings/gobject/WebKitDOMBinding.cpp:
303         * bindings/gobject/WebKitDOMBinding.h:
304         * bindings/gobject/WebKitDOMEventTarget.cpp:
305         * bindings/gobject/WebKitDOMEventTarget.h:
306         * bindings/gobject/WebKitDOMEventTargetPrivate.h:
307         (WebKit):
308         * bindings/gobject/WebKitDOMObject.cpp:
309         * bindings/gobject/WebKitDOMObject.h:
310         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
311         * bindings/gobject/WebKitHTMLElementWrapperFactory.h:
312         * bindings/scripts/CodeGeneratorGObject.pm:
313         (GenerateHeader):
314         (GenerateFunction):
315         (Generate):
316         (WriteData):
317         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
318         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
319         * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
320         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
321         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
322         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h:
323         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
324         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
325         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
326         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
327         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
328         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h:
329         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
330         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
331         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:
332         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
333         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
334         * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h:
335         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
336         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
337         * bindings/scripts/test/GObject/WebKitDOMTestExceptionPrivate.h:
338         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
339         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
340         * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h:
341         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
342         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
343         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h:
344         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
345         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
346         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:
347         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
348         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
349         * bindings/scripts/test/GObject/WebKitDOMTestNodePrivate.h:
350         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
351         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
352         * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h:
353         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
354         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
355         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h:
356
357 2012-11-08  Dan Carney  <dcarney@google.com>
358
359         [V8] Main world should have one DOMDataStore
360         https://bugs.webkit.org/show_bug.cgi?id=101470
361
362         Reviewed by Kentaro Hara.
363
364         The main world DOMWrapperWorld held onto a DOMDataStore that should
365         never be used, as there is a static one optimized for speed in
366         DOMDataStore.
367
368         No new tests. No change in functionality.
369
370         * bindings/v8/DOMDataStore.cpp:
371         (WebCore::DOMDataStore::current):
372         * bindings/v8/DOMWrapperWorld.h:
373         (WebCore::DOMWrapperWorld::isolatedWorldDomDataStore):
374         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
375         * bindings/v8/V8DOMWrapper.h:
376         (WebCore::V8DOMWrapper::getCachedWrapper):
377
378 2012-11-08  Laszlo Gombos  <l.gombos@samsung.com>
379
380         [EFL] Remove non-variable options from the build system
381         https://bugs.webkit.org/show_bug.cgi?id=101506
382
383         Reviewed by Kenneth Rohde Christiansen.
384
385         Remove WTF_USE_ICU_UNICODE, WTF_USE_CAIRO and WTF_USE_FREETYPE cmake variables
386         as these are always set to const 1 and not really configurable.
387
388         Remove duplicate platform/graphics/cairo include path from
389         PlatformEfl.cmake.
390
391         No new tests as there is no new functionality.
392
393         * PlatformEfl.cmake:
394
395 2012-11-08  KyungTae Kim  <ktf.kim@samsung.com>
396
397         Unused parameters on GraphicsLayerUpdater.cpp
398         https://bugs.webkit.org/show_bug.cgi?id=101577
399
400         Reviewed by Kentaro Hara.
401
402         The parameter 'displayID' is not used when !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
403         Use UNUSED_PARAM macro for removing -Wunused-parameter warnings
404
405         * platform/graphics/GraphicsLayerUpdater.cpp:
406         (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
407         (WebCore::GraphicsLayerUpdater::screenDidChange):
408
409 2012-11-08  Alexander Pavlov  <apavlov@chromium.org>
410
411         Web Inspector: Add option to disable rulers (Elements panel)
412         https://bugs.webkit.org/show_bug.cgi?id=101554
413
414         Reviewed by Pavel Feldman.
415
416         A new setting, showMetricsRulers, has been introduced (off by default, so users need to opt in to see the rulers).
417         The setting value is passed into InspectorDOMAgent, down to the InspectorOverlayPage, which affects the drawGrid() and
418         drawRulers() calls. As a side effect, the issue when the rulers were painted for elements having no renderers has been fixed.
419
420         No new tests, a UI change.
421
422         * English.lproj/localizedStrings.js: Add "Show rulers" string.
423         * inspector/InspectorDOMAgent.cpp:
424         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject): Copy over the showRulers value.
425         * inspector/InspectorOverlay.cpp:
426         (WebCore::buildObjectForHighlight): Copy over the showRulers value.
427         * inspector/InspectorOverlay.h:
428         (HighlightConfig): Add |bool showRulers|.
429         (WebCore::Highlight::Highlight): Initialize fields.
430         (Highlight): Add |bool showRulers|.
431         (WebCore::Highlight::setDataFromConfig):
432         * inspector/InspectorOverlayPage.html:
433         * inspector/front-end/DOMAgent.js: Make use of WebInspector.settings.showMetricsRulers when building the highlight DTO.
434         * inspector/front-end/Settings.js: Add showMetricsRulers.
435         * inspector/front-end/SettingsScreen.js:
436         (WebInspector.GenericSettingsTab): Add "Show rulers" checkbox in the Elements panel section.
437
438 2012-11-08  Alexander Shalamov  <alexander.shalamov@intel.com>
439
440         Warn in the inspector console when using dpi and dpcm units outside of media="print"
441         https://bugs.webkit.org/show_bug.cgi?id=100865
442
443         Reviewed by Kenneth Rohde Christiansen.
444
445         Added function that prints warning to inspector console whenever dpi or dpcm CSS units
446         are used for screen media.
447
448         Test: fast/media/mq-resolution-dpi-dpcm-warning.html
449
450         * css/CSSStyleSheet.cpp:
451         (WebCore::CSSStyleSheet::setMediaQueries):
452         * css/MediaList.cpp:
453         (WebCore):
454         (WebCore::addResolutionWarningMessageToConsole):
455         (WebCore::reportMediaQueryWarningIfNeeded):
456         * css/MediaList.h:
457         (WebCore):
458         * css/MediaQueryMatcher.cpp:
459         (WebCore::MediaQueryMatcher::matchMedia):
460         * css/StyleSheetContents.cpp:
461         (WebCore::StyleSheetContents::parserAppendRule):
462
463 2012-11-08  Eugene Klyuchnikov  <eustas.bug@gmail.com>
464
465         Web Inspector: Console: "time" and "timeEnd" should have same number of required arguments
466         https://bugs.webkit.org/show_bug.cgi?id=101451
467
468         Reviewed by Yury Semikhatsky.
469
470         Solution: make console.time "title" parameter mandatory.
471
472         * page/Console.idl: Changed parameter specification.
473
474 2012-11-08  Vsevolod Vlasov  <vsevik@chromium.org>
475
476         Unreviewed fixed inspector frontend compilation
477
478         * inspector/front-end/DataGrid.js:
479
480 2012-11-08  Zeno Albisser  <zeno@webkit.org>
481
482         GraphicsSurfaceGLX needs to query the drawable for YInversion.
483         https://bugs.webkit.org/show_bug.cgi?id=101472
484
485         After r133049 the WebGL content is now displayed upside down
486         for the Qt port. We cannot just apply a generic rule, that
487         the content needs to be flipped upside down.
488         Instead we have to query GLX to tell us, if the drawable's
489         framebuffer is y-inverted.
490
491         Reviewed by Kenneth Rohde Christiansen.
492
493         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
494         (WebCore::GraphicsSurfacePrivate::textureIsYInverted):
495         (GraphicsSurfacePrivate):
496         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
497
498 2012-11-08  Mike West  <mkwst@chromium.org>
499
500         Warn when parsing an invalid X-Frame-Options header.
501         https://bugs.webkit.org/show_bug.cgi?id=101447
502
503         Reviewed by Adam Barth.
504
505         An 'X-Frame-Options' header that contains an invalid option (that is,
506         neither 'DENY' nor 'SAMEORIGIN') is ignored. This patch adds a console
507         warning to notify developers that they've made a mistake.
508
509         Test: http/tests/security/XFrameOptions/x-frame-options-invalid.html
510
511         * dom/Document.cpp:
512         (WebCore::Document::processHttpEquiv):
513             Move the request identifier generation out of the failure block in
514             order to pass it into 'shouldInterruptLoadForXFrameOptions'. This
515             ensures that the console message is properly tied to a request.
516         * loader/FrameLoader.cpp:
517         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
518         * loader/FrameLoader.h:
519         (FrameLoader):
520             'shouldInterruptLoadForXFrameOptions' now accepts a request
521             identifier as a parameter, and generates a console message if the
522             load is blocked.
523         * loader/MainResourceLoader.cpp:
524         (WebCore::MainResourceLoader::didReceiveResponse):
525             Pass the request identifier into 'shouldInterruptLoadForXFrameOptions'.
526
527 2012-11-08  Eugene Klyuchnikov  <eustas.bug@gmail.com>
528
529         Web Inspector: Timeline: Improve time/timeEnd appearance.
530         https://bugs.webkit.org/show_bug.cgi?id=100936
531
532         Reviewed by Yury Semikhatsky.
533
534         Changes:
535         - time/timeEnd records should be top level records only in "glue" mode
536         - time/timeEnd records should display "message" in record list / popover
537         - glued records add aggregated statistics to root record
538         - glued records do not reduce their origin self time
539
540         Test: inspector/timeline/timeline-time.html
541
542         * English.lproj/localizedStrings.js: Added "Message" string.
543         * inspector/front-end/TimelinePresentationModel.js:
544         (WebInspector.TimelinePresentationModel.Record): Added "origin" field.
545
546 2012-11-08  Yury Semikhatsky  <yurys@chromium.org>
547
548         Web Inspector: move front-end methods called from native part to InspectorFrontendAPI
549         https://bugs.webkit.org/show_bug.cgi?id=101463
550
551         Reviewed by Vsevolod Vlasov.
552
553         Moved Web Inspector methods called from native code to InspectorFrontendAPI.
554
555         * inspector/InspectorClient.cpp:
556         (WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
557         * inspector/InspectorFrontendHost.cpp:
558         (WebCore::FrontendMenuProvider::create):
559         (WebCore::FrontendMenuProvider::disconnect):
560         (WebCore::FrontendMenuProvider::FrontendMenuProvider):
561         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
562         (WebCore::FrontendMenuProvider::contextMenuCleared):
563         (FrontendMenuProvider):
564         (WebCore::InspectorFrontendHost::showContextMenu):
565         * inspector/front-end/InspectorFrontendAPI.js:
566         (InspectorFrontendAPI.loadCompleted):
567         (InspectorFrontendAPI.contextMenuItemSelected):
568         (InspectorFrontendAPI.contextMenuCleared):
569         (InspectorFrontendAPI.dispatchMessageAsync):
570         (InspectorFrontendAPI.dispatchMessage):
571         * inspector/front-end/inspector.js:
572
573 2012-11-08  Kunihiko Sakamoto  <ksakamoto@chromium.org>
574
575         User can change a disabled select (drop down box)
576         https://bugs.webkit.org/show_bug.cgi?id=100932
577
578         Reviewed by Kent Tamura.
579
580         <select> should not handle events if it's disabled.
581
582         Test: fast/forms/select/select-disabled.html
583
584         * html/HTMLSelectElement.cpp:
585         (WebCore::HTMLSelectElement::defaultEventHandler):
586
587 2012-11-08  Alec Flett  <alecflett@chromium.org>
588
589         IndexedDB: Rename methods and remove dead code from IDBBackingStore
590         https://bugs.webkit.org/show_bug.cgi?id=101488
591
592         Reviewed by Ojan Vafai.
593
594         In preparation for merging IDBBackingStore and IDBLevelDBBackingStore:
595
596         1) rename ObjectStoreRecordIdentifier to RecordIdentifier
597         2) remove IDBBackingStore::forEachRecord and friends
598         3) remove IDBBackingStore::Cursor::close, since it was an empty method.
599
600         No new tests as this is purely code cleanup.
601
602         * Modules/indexeddb/IDBBackingStore.cpp:
603         (WebCore::IDBLevelDBBackingStore::getRecord):
604         (WebCore):
605         (WebCore::IDBLevelDBBackingStore::putRecord):
606         (WebCore::IDBLevelDBBackingStore::createInvalidRecordIdentifier):
607         (WebCore::IDBLevelDBBackingStore::deleteRecord):
608         (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
609         (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
610         (WebCore::IDBLevelDBBackingStore::deleteIndexDataForRecord):
611         * Modules/indexeddb/IDBBackingStore.h:
612         (WebCore::IDBBackingStore::RecordIdentifier::~RecordIdentifier):
613         (IDBBackingStore):
614         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
615         (WebCore::IDBCursorBackendImpl::close):
616         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
617         (WebCore::IDBIndexBackendImpl::countInternal):
618         (WebCore::IDBIndexBackendImpl::getInternal):
619         (WebCore::IDBIndexBackendImpl::getKeyInternal):
620         * Modules/indexeddb/IDBLevelDBBackingStore.h:
621         (IDBLevelDBBackingStore):
622         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
623         (WebCore::IDBObjectStoreBackendImpl::getInternal):
624         (WebCore):
625         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
626         (WebCore::IDBObjectStoreBackendImpl::putInternal):
627         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
628         (WebCore::IDBObjectStoreBackendImpl::countInternal):
629
630 2012-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
631
632         Web Inspector: console error after inspecting IndexedDB
633         https://bugs.webkit.org/show_bug.cgi?id=101481
634
635         Reviewed by Pavel Feldman.
636
637         Added objectId nullity check to RemoteOBject::release.
638         Drive-by added release for entry key and primaryKey.
639
640         * inspector/front-end/IndexedDBViews.js:
641         (WebInspector.IDBDataView.prototype.clear):
642         * inspector/front-end/RemoteObject.js:
643         (WebInspector.RemoteObject.prototype.release):
644
645 2012-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
646
647         Web Inspector: Migrate inspector IndexedDB support to frontend API.
648         https://bugs.webkit.org/show_bug.cgi?id=101457
649
650         Reviewed by Pavel Feldman.
651
652         Migrated IndexedDB support to web facing IndexedDB API.
653
654         * inspector/Inspector.json:
655         * inspector/InspectorIndexedDBAgent.cpp:
656         (WebCore):
657         (WebCore::assertIDBFactory):
658         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
659         (WebCore::InspectorIndexedDBAgent::requestDatabase):
660         (WebCore::InspectorIndexedDBAgent::requestData):
661         * inspector/front-end/IndexedDBModel.js:
662         (WebInspector.IndexedDBModel.prototype.innerCallback):
663         (WebInspector.IndexedDBModel.prototype._requestData):
664         * inspector/front-end/IndexedDBViews.js:
665         (WebInspector.IDBDataView.prototype._updateData.callback):
666         (WebInspector.IDBDataView.prototype._updateData):
667         (WebInspector.IDBDataGridNode):
668         (WebInspector.IDBDataGridNode.prototype.createCell):
669
670 2012-08-20  Taiju Tsuiki  <tzik@chromium.org>
671
672         Web Inspector: Drop dimmed crumb handling
673         https://bugs.webkit.org/show_bug.cgi?id=94457
674
675         Reviewed by Vsevolod Vlasov.
676
677         No new tests. Existing inspector test should work.
678
679         * inspector/front-end/ElementsPanel.js:
680         (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
681         (WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes):
682         * inspector/front-end/breadcrumbList.css:
683
684 2012-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
685
686         Web Inspector: Infinite loop in DataGrid::autoSizeColumn
687         https://bugs.webkit.org/show_bug.cgi?id=101363
688
689         Reviewed by Pavel Feldman.
690
691         Test: inspector/datagrid-autosize.html
692
693         * inspector/front-end/DataGrid.js:
694         (WebInspector.DataGrid.prototype._autoSizeWidths):
695         (WebInspector.DataGrid.prototype.autoSizeColumns):
696
697 2012-11-07  Keishi Hattori  <keishi@webkit.org>
698
699         Implement week picking to calendar picker
700         https://bugs.webkit.org/show_bug.cgi?id=101449
701
702         Reviewed by Kent Tamura.
703
704         This adds week picker mode to CalendarPicker.
705
706         No new tests. Tests will be added later when this feature is enabled in DRT.
707
708         * Resources/pagepopups/calendarPicker.css:
709         (.month-mode .day):
710         (.week-mode .available.day-selected.monday): Rounded corners around week selection.
711         (.week-mode .available.day-selected.sunday): Ditto.
712         (.week-mode .unavailable.day-selected):
713         (.week-mode .unavailable.day-selected.monday):
714         (.week-mode .unavailable.day-selected.sunday):
715         (.week-mode .week-column.unavailable.day-selected):
716         (.week-column): Hide week column unless in week mode.
717         (.week-mode .week-column):
718         * Resources/pagepopups/calendarPicker.js:
719         (parseDateString): Support week string.
720         (Week):
721         (Week.parse): Parses "yyyy-Www" string.
722         (Week.createFromDate): Creates Week containing datetime.
723         (Week.createFromToday): Creates Week containing today.
724         (Week.weekOneStartDateForYear): Returns the start date for the first week of year.
725         (Week.numberOfWeeksInYear): Returns the number of weeks in year.
726         (Week._numberOfWeeksSinceDate): Returns number of weeks since a date.
727         (Week.prototype.equals): Returns true if the Weeks are the same.
728         (Week.prototype.previous): Returns the previous Week.
729         (Week.prototype.next): Returns the next Week.
730         (Week.prototype.startDate): Returns start datetime of Week.
731         (Week.prototype.endDate): Returns end datetime of Week.
732         (Week.prototype.valueOf): Returns the milliseconds since epoch.
733         (Week.prototype.toString): Returns ISO week string.
734         (CalendarPicker): Add week picker mode.
735         (CalendarPicker.prototype.showMonth): Use NavigationBehaviour instead of bools.
736         (YearMonthController.prototype.attachTo): Fix bug.
737         (YearMonthController.prototype.moveRelatively): Use new showMonth.
738         (DaysTable.prototype.attachTo): Add week number column.
739         (DaysTable.prototype._renderMonth): Render week numbers.
740         (DaysTable.prototype.navigateToMonth): Render week numbers.
741         (DaysTable.prototype.selectRange):
742         (DaysTable.prototype._selectRangeAtPosition): Week number nodes have an positionX of -1.
743         (DaysTable.prototype._maybeSetPreviousMonth):
744         (DaysTable.prototype._maybeSetNextMonth):
745         (MonthPickerDaysTable.prototype.selectRange):
746         (MonthPickerDaysTable.prototype.selectRangeAndShowEntireRange):
747         (MonthPickerDaysTable.prototype._handleKey):
748         (WeekPickerDaysTable): Added.
749         (WeekPickerDaysTable.prototype._markRangeAsSelected): Marks week as selected.
750         (WeekPickerDaysTable.prototype.selectRange): Selects week.
751         (WeekPickerDaysTable.prototype.selectRangeAndShowEntireRange): Selects week and navigate to show entire selection.
752         (WeekPickerDaysTable.prototype._rangeForNode): Returns Week for node.
753         (WeekPickerDaysTable.prototype._handleKey):
754
755 2012-11-07  Sheriff Bot  <webkit.review.bot@gmail.com>
756
757         Unreviewed, rolling out r133841.
758         http://trac.webkit.org/changeset/133841
759         https://bugs.webkit.org/show_bug.cgi?id=101542
760
761         Reverted patches were innocent (Requested by shinyak on
762         #webkit).
763
764         * WebCore.exp.in:
765         * dom/Element.cpp:
766         (WebCore::Element::shadowPseudoId):
767         * dom/Element.h:
768         (Element):
769         * dom/ElementRareData.cpp:
770         (WebCore::ElementRareData::reportMemoryUsage):
771         * dom/ElementRareData.h:
772         (ElementRareData):
773         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
774         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
775         * html/ColorInputType.cpp:
776         (WebCore::ColorInputType::createShadowSubtree):
777         * html/HTMLTextAreaElement.cpp:
778         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
779         * html/RangeInputType.cpp:
780         (WebCore::RangeInputType::createShadowSubtree):
781         * html/TextFieldInputType.cpp:
782         (WebCore::TextFieldInputType::createShadowSubtree):
783         (WebCore::TextFieldInputType::updatePlaceholderText):
784         * html/ValidationMessage.cpp:
785         (WebCore::ValidationMessage::buildBubbleTree):
786         * html/shadow/DateTimeEditElement.cpp:
787         (WebCore::DateTimeEditBuilder::visitLiteral):
788         (WebCore::DateTimeEditElement::DateTimeEditElement):
789         * html/shadow/DateTimeFieldElement.cpp:
790         (WebCore::DateTimeFieldElement::initialize):
791         * html/shadow/DateTimeFieldElement.h:
792         (DateTimeFieldElement):
793         * html/shadow/PickerIndicatorElement.cpp:
794         (WebCore::PickerIndicatorElement::PickerIndicatorElement):
795         * html/track/TextTrackCue.cpp:
796         (WebCore::TextTrackCueBox::TextTrackCueBox):
797         (WebCore::TextTrackCue::updateDisplayTree):
798         * testing/Internals.cpp:
799         (WebCore::Internals::setShadowPseudoId):
800
801 2012-11-07  Simon Fraser  <simon.fraser@apple.com>
802
803         Fix EFL build, which has accelerated compositing disabled, by making
804         repaintViewRectangle() const.
805
806         * rendering/RenderView.cpp:
807         (WebCore::RenderView::repaintViewRectangle):
808         * rendering/RenderView.h:
809         (RenderView):
810
811 2012-11-07  Simon Fraser  <simon.fraser@apple.com>
812
813         constify ALL the repaint containers
814         https://bugs.webkit.org/show_bug.cgi?id=101541
815
816         Reviewed by Beth Dakin.
817
818         Make all the RenderLayerModelObject* repaintContainer arguments const, since
819         these member functions should have no need to mutate this object.
820
821         * WebCore.exp.in:
822         * rendering/RenderBR.h:
823         * rendering/RenderBlock.cpp:
824         (WebCore::RenderBlock::selectionGapRectsForRepaint):
825         (WebCore::RenderBlock::rectWithOutlineForRepaint):
826         * rendering/RenderBlock.h:
827         * rendering/RenderBox.cpp:
828         (WebCore::RenderBox::outlineBoundsForRepaint):
829         (WebCore::RenderBox::mapLocalToContainer):
830         (WebCore::RenderBox::clippedOverflowRectForRepaint):
831         (WebCore::RenderBox::computeRectForRepaint):
832         * rendering/RenderBox.h:
833         * rendering/RenderFlowThread.cpp:
834         (WebCore::RenderFlowThread::repaintRectangleInRegions): Need to use a const_iterator.
835         * rendering/RenderFlowThread.h:
836         * rendering/RenderInline.cpp:
837         (WebCore::RenderInline::clippedOverflowRectForRepaint):
838         (WebCore::RenderInline::rectWithOutlineForRepaint):
839         (WebCore::RenderInline::computeRectForRepaint):
840         (WebCore::RenderInline::mapLocalToContainer):
841         * rendering/RenderInline.h:
842         * rendering/RenderListMarker.cpp:
843         (WebCore::RenderListMarker::selectionRectForRepaint):
844         * rendering/RenderListMarker.h:
845         * rendering/RenderObject.cpp:
846         (WebCore::RenderObject::repaintUsingContainer):
847         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
848         (WebCore::RenderObject::rectWithOutlineForRepaint):
849         (WebCore::RenderObject::clippedOverflowRectForRepaint):
850         (WebCore::RenderObject::computeRectForRepaint):
851         (WebCore::RenderObject::computeFloatRectForRepaint):
852         (WebCore::RenderObject::mapLocalToContainer):
853         (WebCore::RenderObject::localToContainerQuad):
854         (WebCore::RenderObject::localToContainerPoint):
855         * rendering/RenderObject.h:
856         (WebCore::RenderObject::selectionRectForRepaint):
857         (WebCore::RenderObject::outlineBoundsForRepaint):
858         * rendering/RenderReplaced.cpp:
859         (WebCore::RenderReplaced::selectionRectForRepaint):
860         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
861         * rendering/RenderReplaced.h:
862         * rendering/RenderTableCell.cpp:
863         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
864         (WebCore::RenderTableCell::computeRectForRepaint):
865         * rendering/RenderTableCell.h:
866         * rendering/RenderTableCol.cpp:
867         (WebCore::RenderTableCol::clippedOverflowRectForRepaint):
868         * rendering/RenderTableCol.h:
869         * rendering/RenderTableRow.cpp:
870         (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
871         * rendering/RenderTableRow.h:
872         * rendering/RenderText.cpp:
873         (WebCore::RenderText::clippedOverflowRectForRepaint):
874         (WebCore::RenderText::selectionRectForRepaint):
875         * rendering/RenderText.h:
876         * rendering/RenderView.cpp:
877         (WebCore::RenderView::mapLocalToContainer):
878         (WebCore::RenderView::computeRectForRepaint):
879         * rendering/RenderView.h:
880         * rendering/svg/RenderSVGForeignObject.cpp:
881         (WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint):
882         (WebCore::RenderSVGForeignObject::computeFloatRectForRepaint):
883         (WebCore::RenderSVGForeignObject::mapLocalToContainer):
884         * rendering/svg/RenderSVGForeignObject.h:
885         * rendering/svg/RenderSVGGradientStop.h:
886         * rendering/svg/RenderSVGHiddenContainer.h:
887         * rendering/svg/RenderSVGInline.cpp:
888         (WebCore::RenderSVGInline::clippedOverflowRectForRepaint):
889         (WebCore::RenderSVGInline::computeFloatRectForRepaint):
890         (WebCore::RenderSVGInline::mapLocalToContainer):
891         * rendering/svg/RenderSVGInline.h:
892         * rendering/svg/RenderSVGModelObject.cpp:
893         (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint):
894         (WebCore::RenderSVGModelObject::computeFloatRectForRepaint):
895         (WebCore::RenderSVGModelObject::mapLocalToContainer):
896         (WebCore::RenderSVGModelObject::outlineBoundsForRepaint):
897         * rendering/svg/RenderSVGModelObject.h:
898         * rendering/svg/RenderSVGRoot.cpp:
899         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
900         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
901         (WebCore::RenderSVGRoot::mapLocalToContainer):
902         * rendering/svg/RenderSVGRoot.h:
903         * rendering/svg/RenderSVGText.cpp:
904         (WebCore::RenderSVGText::clippedOverflowRectForRepaint):
905         (WebCore::RenderSVGText::computeRectForRepaint):
906         (WebCore::RenderSVGText::computeFloatRectForRepaint):
907         (WebCore::RenderSVGText::mapLocalToContainer):
908         * rendering/svg/RenderSVGText.h:
909         * rendering/svg/SVGRenderSupport.cpp:
910         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
911         (WebCore::SVGRenderSupport::computeFloatRectForRepaint):
912         (WebCore::SVGRenderSupport::mapLocalToContainer):
913         * rendering/svg/SVGRenderSupport.h:
914         (SVGRenderSupport):
915
916 2012-11-07  Kent Tamura  <tkent@chromium.org>
917
918         [Chromium-win] Refactor date/time format conversion code in LocaleWin
919         https://bugs.webkit.org/show_bug.cgi?id=101329
920
921         Reviewed by Kentaro Hara.
922
923         convertWindowsDateFormatToLDML and convertWindowsTimeFormatToLDML did
924         similar jobs with different code. We can merge them into one function.
925
926         As for the date format conversion, we have tokenized a format string and
927         stored token objects into a vector. We skip token object generation and
928         generate a LDML-compliant pattern string during parsing.
929
930         No new tests. This should make no behavior changes and
931         WebKit/chromium/tests/LocaleWinTest.cpp has test cases.
932
933         * platform/text/win/LocaleWin.cpp:
934         (WebCore): Remove DateFormatToken, isFooSymbol, ensureShortDateTokens,
935         convertWindowsDateFormatToLDML, mapCharacterToDateTimeFieldType, and
936         convertWindowsTimeFormatToLDML.
937         (WebCore::commitLiteralToken): Store the result to the specified StringBuilder.
938         (WebCore::convertWindowsDateTimeFormat):
939         Renamed from parseDateFormat, and supports time format symbols.
940         (WebCore::LocaleWin::dateFormat): Use convertWindowsDateTimeFormat.
941         (WebCore::LocaleWin::monthFormat): Ditto.
942         (WebCore::LocaleWin::timeFormat): Ditto.
943         (WebCore::LocaleWin::shortTimeFormat): Ditto.
944         * platform/text/win/LocaleWin.h:
945         (LocaleWin): Remove ensureShortDateTokens and m_shortDateTokens.
946
947 2012-11-07  Shinya Kawanaka  <shinyak@chromium.org>
948
949         Unreviewed, rolling out r133428 and r133749
950         https://bugs.webkit.org/show_bug.cgi?id=101533
951
952         These patches might cause memory regression.
953
954         * WebCore.exp.in:
955         * dom/Element.cpp:
956         (WebCore::Element::shadowPseudoId):
957         (WebCore):
958         (WebCore::Element::setShadowPseudoId):
959         * dom/Element.h:
960         (Element):
961         * dom/ElementRareData.cpp:
962         (WebCore::ElementRareData::reportMemoryUsage):
963         * dom/ElementRareData.h:
964         (ElementRareData):
965         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
966         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
967         * html/ColorInputType.cpp:
968         (WebCore::ColorInputType::createShadowSubtree):
969         * html/HTMLTextAreaElement.cpp:
970         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
971         * html/RangeInputType.cpp:
972         (WebCore::RangeInputType::createShadowSubtree):
973         * html/TextFieldInputType.cpp:
974         (WebCore::TextFieldInputType::createShadowSubtree):
975         (WebCore::TextFieldInputType::updatePlaceholderText):
976         * html/ValidationMessage.cpp:
977         (WebCore::ValidationMessage::buildBubbleTree):
978         * html/shadow/DateTimeEditElement.cpp:
979         (WebCore::DateTimeEditBuilder::visitLiteral):
980         (WebCore::DateTimeEditElement::DateTimeEditElement):
981         * html/shadow/DateTimeFieldElement.cpp:
982         (WebCore::DateTimeFieldElement::initialize):
983         * html/shadow/DateTimeFieldElement.h:
984         (DateTimeFieldElement):
985         * html/shadow/PickerIndicatorElement.cpp:
986         (WebCore::PickerIndicatorElement::PickerIndicatorElement):
987         * html/track/TextTrackCue.cpp:
988         (WebCore::TextTrackCueBox::TextTrackCueBox):
989         (WebCore::TextTrackCue::updateDisplayTree):
990         * testing/Internals.cpp:
991         (WebCore::Internals::setShadowPseudoId):
992
993 2012-11-07  Ryosuke Niwa  <rniwa@webkit.org>
994
995         Crash in WebCore::RenderLayer::normalFlowList
996         https://bugs.webkit.org/show_bug.cgi?id=101528
997
998         Reviewed by Simon Fraser.
999
1000         Make sure the layout is up to date before re-computing the caret rect.
1001         Avoid doing the layout when the selection is cleared since we can always stop
1002         the blink timer in that case.
1003
1004         Unfortunately, we haven't found any reproduction of this crash yet.
1005
1006         * editing/FrameSelection.cpp:
1007         (WebCore::isNonOrphanedCaret):
1008         (WebCore::FrameSelection::localCaretRect):
1009         (WebCore::FrameSelection::updateAppearance):
1010
1011 2012-11-07  Adam Barth  <abarth@webkit.org>
1012
1013         [V8] IntrusiveDOMWrapperMap should be usable for more than just Nodes
1014         https://bugs.webkit.org/show_bug.cgi?id=101110
1015
1016         Reviewed by Kentaro Hara.
1017
1018         Hopefully the memory issues with this patch have been resolved by
1019         fixing bug 101525. This patch re-lands this patch again, hopefully for
1020         the last time.
1021
1022         * bindings/v8/DOMDataStore.cpp:
1023         (WebCore::DOMDataStore::weakCallback):
1024         * bindings/v8/DOMDataStore.h:
1025         (WebCore::DOMDataStore::wrapperIsStoredInObject):
1026         (WebCore::DOMDataStore::getWrapperFromObject):
1027         (WebCore::DOMDataStore::setWrapperInObject):
1028
1029 2012-11-07  KyungTae Kim  <ktf.kim@samsung.com>
1030
1031         Seam occurred between pieces of ShadowBlur on floating point zoom
1032         https://bugs.webkit.org/show_bug.cgi?id=101435
1033
1034         Reviewed by Simon Fraser.
1035
1036         When paint Shadow that doesn't have blurred edge on floating point zoom,
1037         pixel seam (pixel cracks) occurred between pieces of the ShadowBlur because of unaligned clip rect.
1038         So, enlarge the clipping area 1 pixel so that the fill does not bleed (due to antialiasing)
1039         even if the unaligned clip rect occurred.
1040
1041
1042         * platform/graphics/ShadowBlur.cpp:
1043         (WebCore::ShadowBlur::calculateLayerBoundingRect):
1044
1045 2012-11-07  Tim Horton  <timothy_horton@apple.com>
1046
1047         Repaint issues with -webkit-svg-shadow used on a container
1048         https://bugs.webkit.org/show_bug.cgi?id=65643
1049         <rdar://problem/7600532>
1050
1051         Reviewed by Simon Fraser.
1052
1053         SVG renderer repaint rects are currently expanded only by the shadow of
1054         the renderer itself; however, the area they need to repaint can be larger
1055         than that, if their parents also have shadows. We need to take into account
1056         parent's shadows (respecting transforms, as well).
1057
1058         clippedOverflowRectForRepaint already recurses upwards through the render tree,
1059         and ends up with a rect in layout coordinates, so we manually apply the shadow
1060         at each step (repaintRectInLocalCoordinatesExcludingSVGShadow was added to allow
1061         us to get the raw repaint rect without the shadow baked-in).
1062
1063         repaintRectInLocalCoordinates now includes shadows from all parents.
1064
1065         Also, RenderSVGRoot was clipping repaint rects to the viewport before applying
1066         shadows, so offscreen elements with on-screen shadows (applied by the root) would not paint the shadows.
1067         We can just swap the order of these things to correct this.
1068
1069         Tests: svg/css/parent-shadow-offscreen.svg, svg/css/root-shadow-offscreen.svg, svg/repaint/repaint-webkit-svg-shadow.svg
1070
1071         * rendering/RenderObject.cpp:
1072         (WebCore::RenderObject::addChild): Mark the child being added as having an SVG shadow if it is being added as a child of an element that does.
1073         (WebCore::RenderObject::styleDidChange): Mark the child being added as having an SVG shadow if its new style has a shadow.
1074         * rendering/svg/RenderSVGImage.cpp:
1075         (WebCore::RenderSVGImage::layout): Cache the repaint rect before intersecting it with the shadow.
1076         * rendering/svg/RenderSVGImage.h:
1077         (WebCore::RenderSVGImage::repaintRectInLocalCoordinatesExcludingSVGShadow): Return the cached repaint rect for the renderer without the shadow included.
1078         * rendering/svg/RenderSVGModelObject.cpp:
1079         (WebCore::RenderSVGModelObject::RenderSVGModelObject): Renderers do not have a shadow by default.
1080         * rendering/svg/RenderSVGModelObject.h:
1081         (WebCore::RenderSVGModelObject::repaintRectInLocalCoordinatesExcludingSVGShadow): Return the cached repaint rect for the renderer without the shadow included.
1082         (WebCore::RenderSVGModelObject::hasSVGShadow): Return whether or not the renderer has a shadow.
1083         (WebCore::RenderSVGModelObject::setHasSVGShadow): Set whether or not the renderer has a shadow.
1084         * rendering/svg/RenderSVGRoot.cpp:
1085         (WebCore::RenderSVGRoot::RenderSVGRoot):
1086         (WebCore::RenderSVGRoot::computeFloatRectForRepaint): Apply the shadow before clipping to the viewport, so we draw shadows for elements outside the viewport.
1087         (WebCore::RenderSVGRoot::updateCachedBoundaries): Cache the repaint rect before intersecting it with the shadow.
1088         * rendering/svg/RenderSVGRoot.h:
1089         (WebCore::RenderSVGRoot::hasSVGShadow): Return whether or not the renderer has a shadow.
1090         (WebCore::RenderSVGRoot::setHasSVGShadow): Set whether or not the renderer has a shadow.
1091         (WebCore::RenderSVGRoot::repaintRectInLocalCoordinatesExcludingSVGShadow): Return the cached repaint rect for the renderer without the shadow included.
1092         * rendering/svg/RenderSVGShape.cpp:
1093         (WebCore::RenderSVGShape::updateRepaintBoundingBox): Cache the repaint rect before intersecting it with the shadow.
1094         * rendering/svg/RenderSVGShape.h:
1095         (WebCore::RenderSVGShape::repaintRectInLocalCoordinatesExcludingSVGShadow): Return the cached repaint rect for the renderer without the shadow included.
1096         * rendering/svg/SVGRenderSupport.cpp:
1097         (WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow): Return the cached repaint rect for the renderer without the shadow included.
1098         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint): Apply shadows as we walk through our parents, instead of only applying the renderer's own shadow.
1099         (WebCore::SVGRenderSupport::rendererHasSVGShadow): Return whether or not the renderer has a shadow.
1100         (WebCore::SVGRenderSupport::setRendererHasSVGShadow): Set whether or not the renderer has a shadow.
1101         (WebCore::SVGRenderSupport::intersectRepaintRectWithShadows): Walk through the element's parents, adding shadows to the repaint rect as we go, eventually
1102         transforming the repaint rect back into local coordinates.
1103         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources): Don't add shadows by default, just other resources, so that we can cache repaint rects with and without shadows.
1104         * rendering/svg/SVGRenderSupport.h:
1105
1106 2012-11-07  Anders Carlsson  <andersca@apple.com>
1107
1108         Add RemoteGraphicsLayer class
1109         https://bugs.webkit.org/show_bug.cgi?id=101535
1110
1111         Reviewed by Simon Fraser.
1112
1113         * WebCore.exp.in:
1114         Export GraphicsLayer symbols required by WebKit2.
1115
1116         * WebCore.xcodeproj/project.pbxproj:
1117         Make GraphicsLayerFactory.h a private header.
1118
1119 2012-11-07  Adam Barth  <abarth@webkit.org>
1120
1121         [V8] Don't leak <img> elements in content scripts
1122         https://bugs.webkit.org/show_bug.cgi?id=101525
1123
1124         Reviewed by Ojan Vafai.
1125
1126         I found the leak that was causing a problem for bug 101110. We weren't
1127         filling in the derefObjectFunction for HTMLImageElements (and
1128         potentially some other types of elements). That manifests today as a
1129         memory leak in content scripts (which use the derefObjectFunction for
1130         nodes) and caused a memory leak after bug 101110 because we started
1131         using the derefObjectFunction in the main world as well.
1132
1133         This patch adds ASSERTs so that we won't make this mistake in the future.
1134
1135         * bindings/scripts/CodeGeneratorV8.pm:
1136         (GenerateNamedConstructorCallback):
1137         * bindings/v8/DOMDataStore.cpp:
1138         (WebCore::DOMDataStore::weakCallback):
1139         * bindings/v8/DOMWrapperMap.h:
1140         (WebCore::DOMWrapperMap::defaultWeakCallback):
1141         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1142         (WebCore):
1143
1144 2012-11-07  Alec Flett  <alecflett@chromium.org>
1145
1146         IndexedDB: Prepare for IDBBackingStore merge by renaming IDBLevelDBBackingStore.cpp
1147         https://bugs.webkit.org/show_bug.cgi?id=101486
1148
1149         Reviewed by Ojan Vafai.
1150
1151         Rename IDBLevelDBBackingStore.cpp to IDBBackingStore.cpp in
1152         preparation for merging these classes. This will make the merge
1153         diffs sane. See https://bugs.webkit.org/show_bug.cgi?id=101415
1154         for the final goal.
1155
1156         No new tests, this is is just a rename and minor style fix.
1157
1158         * CMakeLists.txt:
1159         * GNUmakefile.list.am:
1160         * Modules/indexeddb/IDBBackingStore.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp.
1161         * WebCore.gypi:
1162         * WebCore.xcodeproj/project.pbxproj:
1163
1164 2012-11-07  Adam Barth  <abarth@webkit.org>
1165
1166         [V8] Prepare DOMDataStore to be able to store ScriptWrappable wrappers inline
1167         https://bugs.webkit.org/show_bug.cgi?id=101523
1168
1169         Unreviewed. Technically this patch hasn't been reviewed, but it is part
1170         of a patch that was reviewed by Kentaro Hara.
1171
1172         Sadly, my patch for bug 101110 triggered the regression again. This
1173         patch is a smaller incremental step towards the patch in bug 101110. It
1174         doesn't make that much sense on its own, but it will help me isolate
1175         the source of the regression.
1176
1177         * bindings/v8/DOMDataStore.h:
1178         (WebCore::DOMDataStore::get):
1179         (DOMDataStore):
1180         (WebCore::DOMDataStore::set):
1181         (WebCore::DOMDataStore::wrapperIsStoredInObject):
1182         (WebCore::DOMDataStore::getWrapperFromObject):
1183         (WebCore::DOMDataStore::setWrapperInObject):
1184
1185 2012-11-05  Ryosuke Niwa  <rniwa@webkit.org>
1186
1187         SimplifyMarkupCommand takes a disproportionally long time to run when there are many nodes to remove
1188         https://bugs.webkit.org/show_bug.cgi?id=101144
1189
1190         Reviewed by Enrica Casucci.
1191
1192         The bug was caused by attach() happening between each node removal. Since the command was trying
1193         to remove millions of node in some cases, attach()ing render objects for each node being reinserted
1194         imposed a huge runtime cost.
1195
1196         Fixed the bug by using lazy attach when removing nodes and avoiding calls to isContentEditable.
1197         Also remove all ancestors at once when they are direct child/parent of each other so that we don't
1198         remove an ancestor and then insert its child back only to remove it again in the next iteration.
1199
1200         No new tests since it doesn't change the asymptotic performance, and adding a new performance test for
1201         this specific case is not the worth the increase in the bot cycle time. I'll note that the email
1202         attached in the original radar bug (<rdar://problem/12179712>) took 100 seconds to open now only takes
1203         7 seconds to open on my MacPro.
1204
1205         * editing/AppendNodeCommand.cpp:
1206         (WebCore::AppendNodeCommand::doApply): Takes a flag indicating whether we should assume nodes are editable
1207         without calling isContentEditable or not.
1208         * editing/ApplyStyleCommand.cpp:
1209         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Update the style as later code requires render
1210         object.
1211         * editing/CompositeEditCommand.cpp:
1212         (WebCore::CompositeEditCommand::insertNodeBefore): Passes a flag to the command.
1213         (WebCore::CompositeEditCommand::removeNode): Ditto.
1214         (WebCore::CompositeEditCommand::removeNodePreservingChildren): Ditto.
1215         * editing/CompositeEditCommand.h:
1216         (CompositeEditCommand):
1217         * editing/DeleteSelectionCommand.cpp:
1218         (WebCore::DeleteSelectionCommand::removeNode): Takes a flag indicating whether we should assume nodes are
1219         editable without calling isContentEditable or not.
1220         * editing/DeleteSelectionCommand.h:
1221         (DeleteSelectionCommand):
1222         * editing/EditCommand.h:
1223         * editing/InsertIntoTextNodeCommand.cpp:
1224         (WebCore::InsertIntoTextNodeCommand::doApply): Update the layout when password echo is enabled since
1225         we need to have render objects for echoing.
1226         * editing/InsertNodeBeforeCommand.cpp:
1227         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Ditto.
1228         (WebCore::InsertNodeBeforeCommand::doApply): Ditto; also always use lazy attach.
1229         (WebCore::InsertNodeBeforeCommand::doUnapply):
1230         * editing/InsertNodeBeforeCommand.h:
1231         (WebCore::InsertNodeBeforeCommand::create):
1232         (InsertNodeBeforeCommand):
1233         * editing/RemoveNodeCommand.cpp:
1234         (WebCore::RemoveNodeCommand::RemoveNodeCommand): Ditto about the flag.
1235         (WebCore::RemoveNodeCommand::doApply):
1236         * editing/RemoveNodeCommand.h:
1237         (WebCore::RemoveNodeCommand::create):
1238         (RemoveNodeCommand):
1239         * editing/RemoveNodePreservingChildrenCommand.cpp:
1240         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand): Ditto.
1241         (WebCore::RemoveNodePreservingChildrenCommand::doApply):
1242         * editing/RemoveNodePreservingChildrenCommand.h:
1243         (WebCore::RemoveNodePreservingChildrenCommand::create):
1244         (RemoveNodePreservingChildrenCommand):
1245         * editing/SimplifyMarkupCommand.cpp:
1246         (WebCore::SimplifyMarkupCommand::doApply):
1247         (WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove): Added to optimize removals of multiple
1248         ancestors.
1249         * editing/SimplifyMarkupCommand.h:
1250         (SimplifyMarkupCommand):
1251
1252 2012-11-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1253
1254         Unreviewed, rolling out r133810.
1255         http://trac.webkit.org/changeset/133810
1256         https://bugs.webkit.org/show_bug.cgi?id=101520
1257
1258         This patch made ws_single_peak_r regress by 15% (Requested by
1259         abarth on #webkit).
1260
1261         * bindings/v8/DOMDataStore.cpp:
1262         (WebCore::DOMDataStore::weakCallback):
1263         * bindings/v8/DOMDataStore.h:
1264         (WebCore::DOMDataStore::get):
1265         (WebCore::DOMDataStore::set):
1266         (DOMDataStore):
1267
1268 2012-11-07  Elliott Sprehn  <esprehn@chromium.org>
1269
1270         Clean up confused use of Document::renderer and renderView
1271         https://bugs.webkit.org/show_bug.cgi?id=101484
1272
1273         Reviewed by Ojan Vafai.
1274
1275         Document::renderer and Document::renderView are the same thing, but it seems
1276         people don't always realize it and check if document()->renderer() is a RenderView.
1277
1278         This patch cleans up usage of document()->renderer() and document()->renderView() and
1279         simplifies the code that was written without realizing they were the same thing.
1280
1281         No new tests, this is just a refactor.
1282
1283         * accessibility/AccessibilityRenderObject.cpp:
1284         (WebCore::AccessibilityRenderObject::visiblePositionForPoint): Lots of simplification.
1285         * dom/Element.cpp:
1286         (WebCore::Element::screenRect):
1287         (WebCore::Element::unregisterNamedFlowContentNode): Remove unneeded conditional.
1288         * editing/FrameSelection.cpp: Remove verbose casts.
1289         (WebCore::clearRenderViewSelection):
1290         (WebCore::FrameSelection::recomputeCaretRect):
1291         (WebCore::CaretBase::invalidateCaretRect):
1292         (WebCore::FrameSelection::focusedOrActiveStateChanged):
1293         * page/Frame.cpp:
1294         (WebCore::Frame::contentRenderer): Vastly simplified.
1295         * page/PrintContext.cpp: Remove verbose casts.
1296         (WebCore::PrintContext::computePageRects):
1297         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
1298         * page/wince/FrameWinCE.cpp:
1299         (WebCore::computePageRectsForFrame): Remove unreachable code.
1300         * rendering/RenderObject.cpp:
1301         (WebCore::RenderObject::maximalOutlineSize): Remove verbose cast.
1302
1303 2012-11-07  Adam Barth  <abarth@webkit.org>
1304
1305         [V8] IntrusiveDOMWrapperMap should be usable for more than just Nodes
1306         https://bugs.webkit.org/show_bug.cgi?id=101110
1307
1308         Reviewed by Kentaro Hara.
1309
1310         This patch generalizes our support for storing wrappers in DOM objects
1311         to be usable for more than just nodes. After this patch, any object
1312         with a ScriptWrappable base class will have its wrapper stored inline
1313         in the object in the main world.
1314
1315         * bindings/v8/DOMDataStore.cpp:
1316         (WebCore::DOMDataStore::weakCallback):
1317         * bindings/v8/DOMDataStore.h:
1318         (WebCore::DOMDataStore::get):
1319         (WebCore::DOMDataStore::set):
1320
1321 2012-11-07  Tiancheng Jiang  <tijiang@rim.com>
1322
1323         [BlackBerry] Update BB10 form theme.
1324         https://bugs.webkit.org/show_bug.cgi?id=100760
1325
1326         Reviewed by Rob Buis.
1327
1328         RIM PR 236997
1329         Internally Reviewed by Jakob Petsovits.
1330
1331         Set font family to fix DRT test fast/forms/input-type-text-min-width.html
1332
1333         * platform/blackberry/RenderThemeBlackBerry.cpp:
1334         (WebCore::RenderThemeBlackBerry::defaultGUIFont):
1335         (WebCore):
1336         (WebCore::RenderThemeBlackBerry::systemFont):
1337
1338 2012-11-07  Beth Dakin  <bdakin@apple.com>
1339
1340         https://bugs.webkit.org/show_bug.cgi?id=101303
1341         Fixed position elements that are out of view still end up forcing 
1342         non-threaded scrolling
1343         -and corresponding-
1344         <rdar://problem/12642222>
1345
1346         Reviewed by Simon Fraser.
1347
1348         Re-name hasNonLayerFixedObjects() to 
1349         hasVisibleSlowRepaintFixedObjects() and make it virtual. 
1350         * page/scrolling/ScrollingCoordinator.cpp:
1351         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintFixedObjects):
1352         (WebCore::ScrollingCoordinator::mainThreadScrollingReasons):
1353         * page/scrolling/ScrollingCoordinator.h:
1354         (ScrollingCoordinator):
1355
1356         Override hasVisibleSlowRepaintFixedObjects() to always return false. 
1357         We don't want to bother with the extra computation in the 
1358         ScrollingCoordinator implementation, though other ports might still 
1359         want it.
1360         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1361         (WebCore::ScrollingCoordinatorMac::hasVisibleSlowRepaintFixedObjects):
1362         (ScrollingCoordinatorMac):
1363
1364         Make this function const so that we can call it from 
1365         requiresCompositingForPosition().
1366         * rendering/RenderLayerCompositor.cpp:
1367         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
1368
1369         Actually be thorough here and check if the fixed object has any 
1370         descendants that are visible in the view. If it does, then we do 
1371         want to composite the fixed object.
1372         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1373         * rendering/RenderLayerCompositor.h:
1374
1375 2012-11-07  Roger Fong  <roger_fong@apple.com>
1376
1377         Unreviewed. Style fix following r133262.
1378
1379         * html/HTMLMediaElement.cpp:
1380         (WebCore::HTMLMediaElement::clearMediaPlayer):
1381         * html/HTMLMediaElement.h:
1382         (HTMLMediaElement):
1383
1384 2012-11-07  Adam Barth  <abarth@webkit.org>
1385
1386         [V8] DOMWrapperMap doesn't need to use virtual functions
1387         https://bugs.webkit.org/show_bug.cgi?id=101494
1388
1389         Reviewed by Kentaro Hara.
1390
1391         DOMWrapperMap has only one subclass. There's no reason to use virtual functions.
1392
1393         * bindings/v8/DOMDataStore.cpp:
1394         (WebCore::DOMDataStore::DOMDataStore):
1395         * bindings/v8/DOMWrapperMap.h:
1396         (WebCore::DOMWrapperMap::DOMWrapperMap):
1397         (WebCore::DOMWrapperMap::get):
1398         (WebCore::DOMWrapperMap::set):
1399         (WebCore::DOMWrapperMap::clear):
1400         (WebCore::DOMWrapperMap::reportMemoryUsage):
1401         (WebCore::DOMWrapperMap::remove):
1402         (WebCore::DOMWrapperMap::defaultWeakCallback):
1403         * bindings/v8/V8NPObject.cpp:
1404         (WebCore::staticNPObjectMap):
1405
1406 2012-11-07  Alexandru Chiculita  <achicu@adobe.com>
1407
1408         [CSS Shaders] Remove the dependency on CustomFilterValidatedProgram from CustomFilterRenderer
1409         https://bugs.webkit.org/show_bug.cgi?id=101071
1410
1411         Reviewed by Dean Jackson.
1412
1413         I've removed the need to get a CustomFilterValidatedProgram from FilterEffectRenderer. It was only
1414         used to delay the compilation of the shader until it was really needed. Instead, the FilterEffectRenderer
1415         will directly get the compiled shader in the constructor. The callers that still want to avoid 
1416         compiling the shader until it is really needed can use the setCompiledProgram to inject the shader
1417         at a later time, before painting.
1418
1419         No new tests, the change is covered by the css3/filters/custom/ tests.
1420
1421         * platform/graphics/filters/CustomFilterConstants.h:
1422         * platform/graphics/filters/CustomFilterProgramInfo.h:
1423         * platform/graphics/filters/CustomFilterRenderer.cpp:
1424         (WebCore::CustomFilterRenderer::create):
1425         (WebCore::CustomFilterRenderer::CustomFilterRenderer):
1426         (WebCore::CustomFilterRenderer::premultipliedAlpha):
1427         (WebCore::CustomFilterRenderer::setCompiledProgram):
1428         (WebCore):
1429         (WebCore::CustomFilterRenderer::prepareForDrawing):
1430         (WebCore::CustomFilterRenderer::bindProgramAndBuffers):
1431         * platform/graphics/filters/CustomFilterRenderer.h:
1432         (WebCore):
1433         (CustomFilterRenderer):
1434         (WebCore::CustomFilterRenderer::compiledProgram):
1435         * platform/graphics/filters/FECustomFilter.cpp:
1436         (WebCore::FECustomFilter::FECustomFilter):
1437         (WebCore::FECustomFilter::prepareForDrawing):
1438         * platform/graphics/filters/FECustomFilter.h:
1439         (FECustomFilter):
1440
1441 2012-11-07  Adam Barth  <abarth@webkit.org>
1442
1443         [V8] IntrusiveDOMWrapperMap is no longer needed and can be deleted
1444         https://bugs.webkit.org/show_bug.cgi?id=101493
1445
1446         Reviewed by Kentaro Hara.
1447
1448         This patch is another incremental step towards landing the patch in bug
1449         101110. In this patch, we delete IntrusiveDOMWrapperMap, which is no
1450         longer needed.
1451
1452         * WebCore.gypi:
1453         * bindings/v8/DOMDataStore.cpp:
1454         (WebCore::DOMDataStore::DOMDataStore):
1455         (WebCore::DOMDataStore::~DOMDataStore):
1456         (WebCore::DOMDataStore::reportMemoryUsage):
1457         (WebCore::DOMDataStore::weakCallback):
1458         (WebCore):
1459         * bindings/v8/DOMDataStore.h:
1460         (WebCore::DOMDataStore::get):
1461         (WebCore::DOMDataStore::set):
1462         (DOMDataStore):
1463         * bindings/v8/IntrusiveDOMWrapperMap.h: Removed.
1464         * bindings/v8/V8GCController.cpp:
1465
1466 2012-11-07  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
1467
1468         [AC] glXChooseFBConfig() and glXGetVisualFromFBConfig() return values are leaking in GraphicsSurface
1469         https://bugs.webkit.org/show_bug.cgi?id=101475
1470
1471         Reviewed by Kenneth Rohde Christiansen.
1472
1473         Free the memory returned by glXChooseFBConfig and glXGetVisualFromFBConfig
1474         using XFree to avoid memory leaks.
1475
1476         No tests. No change in behavior.
1477
1478         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
1479         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
1480         (WebCore::GraphicsSurfacePrivate::createSurface):
1481
1482 2012-11-07  Fady Samuel  <fsamuel@chromium.org>
1483
1484         Autoresize should work even if turned on while the page is loading.
1485         https://bugs.webkit.org/show_bug.cgi?id=101380
1486
1487         Reviewed by David Levin.
1488
1489         Autoresize does not work in cases where it is turned on while loading.
1490         This patch addresses this by allowing autoSize to complete if it's turned on
1491         while loading and doing a final pass after loading.
1492
1493         * loader/FrameLoader.cpp:
1494         (WebCore::FrameLoader::checkCompleted):
1495         Adjust to call renamed function.
1496         * page/FrameView.cpp:
1497         (WebCore::FrameView::handleLoadCompleted):
1498         Rename function to encompass its expanded responsibilities (which include doing the final auto size after the load is completed).
1499         (WebCore::FrameView::autoSizeIfEnabled):
1500         Allow the size to shrink if autosize is adjusted while the page is loading.
1501         * page/FrameView.h:
1502         (FrameView):
1503         Renamed 'checkFlushDeferredRepaintsAfterLoadComplete' to 'handleLoadComplete'
1504
1505 2012-11-07  Philip Rogers  <pdr@google.com>
1506
1507         Skip SVG repaint tracking when parent container transforms
1508         https://bugs.webkit.org/show_bug.cgi?id=101177
1509
1510         Reviewed by Eric Seidel.
1511
1512         This patch skips child repaint rect checks when a parent container is transformed, leading
1513         to a 75% increase on the RoboHornet SVG benchmark:
1514             http://www.robohornet.org/#et=svg  (average of 2 runs)
1515             Before patch: 161.6ms
1516             After patch: 38.5ms
1517
1518         SVG transforms are relative to the local container which makes calculating an absolute
1519         repaint rect expensive because it requires multiplying the local repaint rect by each
1520         parent container's local transform. See SVGRenderSupport::computeFloatRectForRepaint
1521         as an example of this calculation.
1522
1523         This patch takes advantage of SVG's container rules: when a parent container's transform
1524         changes, all children must be repainted (there is no absolute positioning in SVG).
1525         SVGRenderSupport::checkForSVGRepaintDuringLayout has been added which checks for whether
1526         the parent transform changed before doing child repaint checks. A similar optimization is
1527         used in HTML (see RenderObject::checkForRepaintDuringLayout) where no repaint checking
1528         is done when the view is fully repainted.
1529
1530         This code is tested in existing tests.
1531
1532         * rendering/svg/RenderSVGContainer.cpp:
1533         (WebCore::RenderSVGContainer::layout):
1534         * rendering/svg/RenderSVGForeignObject.cpp:
1535         (WebCore::RenderSVGForeignObject::layout):
1536         * rendering/svg/RenderSVGImage.cpp:
1537         (WebCore::RenderSVGImage::layout):
1538         * rendering/svg/RenderSVGShape.cpp:
1539         (WebCore::RenderSVGShape::layout):
1540         * rendering/svg/RenderSVGText.cpp:
1541         (WebCore::RenderSVGText::layout):
1542         * rendering/svg/SVGRenderSupport.cpp:
1543         (WebCore::SVGRenderSupport::checkForSVGRepaintDuringLayout):
1544         (WebCore):
1545         * rendering/svg/SVGRenderSupport.h:
1546         (SVGRenderSupport):
1547
1548 2012-11-07  Chris Fleizach  <cfleizach@apple.com>
1549
1550         AX: Textfields don't get focus when navigated to from 'show all tabs' button
1551         https://bugs.webkit.org/show_bug.cgi?id=101369
1552
1553         Reviewed by Darin Adler.
1554
1555         When focus leaves a webpage, the webpage does not normally clear its focused node. When focus
1556         returns (through tab, or mouse click), then focus will be cleared and restored.
1557
1558         However, when focus is returned through accessibility means, focus is not cleared first, which
1559         means subsequent focus actions do nothing.
1560
1561         This fix will check if the focused node is the same as the node being focused, and if so, clear the focus first.
1562
1563         Making a layout test for this is not possible because it requires setting focus to something in the chrome, and then
1564         moving focus back to the webpage.
1565       
1566         * accessibility/AccessibilityRenderObject.cpp:
1567         (WebCore::AccessibilityRenderObject::setFocused):
1568
1569 2012-11-07  Adam Barth  <abarth@webkit.org>
1570
1571         [V8] We should hide the DOMWrapperMaps inside DOMDataStore
1572         https://bugs.webkit.org/show_bug.cgi?id=101430
1573
1574         Reviewed by Kentaro Hara.
1575
1576         This is yet another incremental step towards landing the patch in bug
1577         101110. In this patch, we hide the existence of DOMWrapperMaps inside
1578         DOMDataStore. In the process, we can remove V8DOMMap.cpp.
1579
1580         * UseV8.cmake:
1581         * WebCore.gypi:
1582         * bindings/v8/DOMDataStore.h:
1583         (WebCore::DOMDataStore::set):
1584         * bindings/v8/DOMWrapperWorld.h:
1585         * bindings/v8/ScriptProfiler.cpp:
1586         * bindings/v8/SerializedScriptValue.cpp:
1587         (WebCore::neuterBinding):
1588         * bindings/v8/V8DOMMap.cpp: Removed.
1589         * bindings/v8/V8DOMMap.h: Removed.
1590         * bindings/v8/V8DOMWindowShell.cpp:
1591         * bindings/v8/V8DOMWrapper.h:
1592         (WebCore::V8DOMWrapper::getCachedWrapper):
1593         (WebCore::V8DOMWrapper::setWrapperClass):
1594         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
1595         * bindings/v8/V8NPObject.cpp:
1596         * bindings/v8/WorkerContextExecutionProxy.cpp:
1597         * bindings/v8/WorkerScriptController.cpp:
1598
1599 2012-11-07  Varun Jain  <varunjain@chromium.org>
1600
1601         Add new gesture type, LongTap, which is basically the completion of a GestureLongPress
1602         https://bugs.webkit.org/show_bug.cgi?id=101385
1603
1604         Reviewed by Adam Barth.
1605
1606         Test: Only creating the new enum. No functionality change, hence no tests required.
1607
1608         * platform/PlatformEvent.h:
1609
1610 2012-11-05  Emil A Eklund  <eae@chromium.org>
1611
1612         Remove LayoutTypes abstraction
1613         https://bugs.webkit.org/show_bug.cgi?id=93050
1614
1615         Reviewed by Levi Weintraub.
1616
1617         Remove LayoutTypes abstraction and rename FractionalLayout* to
1618         Layout* now that all platforms use the FractionalLayout version
1619         (albeit with different fractions).
1620
1621         No new tests, no change in functionality.
1622
1623         * CMakeLists.txt:
1624         * GNUmakefile.list.am:
1625         * Target.pri:
1626         * WebCore.exp.in:
1627         * WebCore.gypi:
1628         * WebCore.vcproj/WebCore.vcproj:
1629         * WebCore.xcodeproj/project.pbxproj:
1630         * accessibility/AccessibilityNodeObject.cpp:
1631         * accessibility/AccessibilityNodeObject.h:
1632         * accessibility/AccessibilityObject.h:
1633         * accessibility/AccessibilityRenderObject.h:
1634         * css/LengthFunctions.cpp:
1635         * css/LengthFunctions.h:
1636         * dom/Document.h:
1637         * dom/DocumentMarkerController.h:
1638         * dom/ElementRareData.h:
1639         * dom/MouseRelatedEvent.h:
1640         * dom/Node.h:
1641         * dom/Touch.h:
1642         * editing/FrameSelection.cpp:
1643         * editing/FrameSelection.h:
1644         * editing/RenderedPosition.h:
1645         * html/HTMLAreaElement.h:
1646         * inspector/InspectorOverlay.h:
1647         * inspector/InspectorTimelineAgent.h:
1648         * inspector/TimelineRecordFactory.cpp:
1649         * inspector/TimelineRecordFactory.h:
1650         * loader/cache/CachedImage.h:
1651         * page/FocusController.h:
1652         * page/FrameView.h:
1653         * page/Page.h:
1654         * page/SpatialNavigation.cpp:
1655         * page/SpatialNavigation.h:
1656         * platform/FractionalLayoutUnit.h: Removed.
1657         * platform/LayoutUnit.h: Copied from Source/WebCore/platform/FractionalLayoutUnit.h.
1658         * platform/Length.h:
1659         * platform/PopupMenuClient.h:
1660         * platform/animation/AnimationUtilities.h:
1661         * platform/graphics/FloatPoint.cpp:
1662         * platform/graphics/FloatPoint.h:
1663         * platform/graphics/FloatRect.cpp:
1664         * platform/graphics/FloatRect.h:
1665         * platform/graphics/FloatSize.cpp:
1666         * platform/graphics/FloatSize.h:
1667         * platform/graphics/FractionalLayoutBoxExtent.cpp: Removed.
1668         * platform/graphics/FractionalLayoutBoxExtent.h: Removed.
1669         * platform/graphics/FractionalLayoutPoint.h: Removed.
1670         * platform/graphics/FractionalLayoutRect.cpp: Removed.
1671         * platform/graphics/FractionalLayoutRect.h: Removed.
1672         * platform/graphics/FractionalLayoutSize.h: Removed.
1673         * platform/graphics/GraphicsLayer.cpp:
1674         * platform/graphics/GraphicsLayerAnimation.cpp:
1675         * platform/graphics/IntRect.cpp:
1676         * platform/graphics/IntRect.h:
1677         * platform/graphics/LayoutBoxExtent.cpp: Copied from Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.cpp.
1678         * platform/graphics/LayoutBoxExtent.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutBoxExtent.h.
1679         * platform/graphics/LayoutPoint.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutPoint.h.
1680         * platform/graphics/LayoutRect.cpp: Copied from Source/WebCore/platform/graphics/FractionalLayoutRect.cpp.
1681         * platform/graphics/LayoutRect.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutRect.h.
1682         * platform/graphics/LayoutSize.h: Copied from Source/WebCore/platform/graphics/FractionalLayoutSize.h.
1683         * platform/graphics/MediaPlayer.h:
1684         * platform/graphics/filters/CustomFilterOperation.h:
1685         * platform/graphics/filters/CustomFilterParameterList.h:
1686         * platform/graphics/filters/FilterOperation.h:
1687         * platform/graphics/filters/FilterOperations.h:
1688         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
1689         * platform/graphics/filters/ValidatedCustomFilterOperation.h:
1690         * platform/graphics/qt/FractionalLayoutPointQt.cpp: Removed.
1691         * platform/graphics/qt/FractionalLayoutRectQt.cpp: Removed.
1692         * platform/graphics/qt/FractionalLayoutSizeQt.cpp: Removed.
1693         * platform/graphics/qt/LayoutPointQt.cpp: Copied from Source/WebCore/platform/graphics/qt/FractionalLayoutPointQt.cpp.
1694         * platform/graphics/qt/LayoutRectQt.cpp: Added.
1695         * platform/graphics/qt/LayoutSizeQt.cpp: Copied from Source/WebCore/platform/graphics/qt/FractionalLayoutSizeQt.cpp.
1696         * platform/graphics/transforms/TransformOperations.h:
1697         * platform/graphics/transforms/TransformState.h:
1698         * platform/graphics/transforms/TransformationMatrix.cpp:
1699         * platform/graphics/transforms/TransformationMatrix.h:
1700         * rendering/AutoTableLayout.h:
1701         * rendering/ColumnInfo.h:
1702         * rendering/ExclusionShapeInsideInfo.h:
1703         * rendering/FilterEffectRenderer.h:
1704         * rendering/FixedTableLayout.h:
1705         * rendering/GapRects.h:
1706         * rendering/HitTestResult.h:
1707         * rendering/HitTestingTransformState.cpp:
1708         * rendering/HitTestingTransformState.h:
1709         * rendering/InlineFlowBox.cpp:
1710         * rendering/LayoutRepainter.cpp:
1711         * rendering/LayoutRepainter.h:
1712         * rendering/LayoutState.h:
1713         * rendering/LayoutTypes.h:
1714         * rendering/LayoutTypesInlineMethods.h:
1715         * rendering/PaintInfo.h:
1716         * rendering/RenderBlock.cpp:
1717         * rendering/RenderBlock.h:
1718         * rendering/RenderBlockLineLayout.cpp:
1719         * rendering/RenderBox.cpp:
1720         * rendering/RenderBox.h:
1721         * rendering/RenderBoxModelObject.cpp:
1722         * rendering/RenderBoxModelObject.h:
1723         * rendering/RenderDeprecatedFlexibleBox.cpp:
1724         * rendering/RenderFieldset.cpp:
1725         * rendering/RenderFlexibleBox.cpp:
1726         * rendering/RenderFlowThread.cpp:
1727         * rendering/RenderGeometryMap.h:
1728         * rendering/RenderImageResource.h:
1729         * rendering/RenderInline.cpp:
1730         * rendering/RenderLayer.cpp:
1731         * rendering/RenderLayerFilterInfo.h:
1732         * rendering/RenderLineBoxList.cpp:
1733         * rendering/RenderListMarker.cpp:
1734         * rendering/RenderMarquee.cpp:
1735         * rendering/RenderMenuList.h:
1736         * rendering/RenderMultiColumnBlock.cpp:
1737         * rendering/RenderMultiColumnSet.cpp:
1738         * rendering/RenderNamedFlowThread.cpp:
1739         * rendering/RenderObject.cpp:
1740         * rendering/RenderObject.h:
1741         * rendering/RenderOverflow.h:
1742         * rendering/RenderRegion.cpp:
1743         * rendering/RenderReplaced.cpp:
1744         * rendering/RenderTable.cpp:
1745         * rendering/RenderTable.h:
1746         * rendering/RenderText.cpp:
1747         * rendering/RenderThemeChromiumCommon.cpp:
1748         * rendering/RenderThemeChromiumCommon.h:
1749         * rendering/RenderTreeAsText.cpp:
1750         * rendering/RenderTreeAsText.h:
1751         * rendering/RenderView.h:
1752         * rendering/style/NinePieceImage.h:
1753         * rendering/style/RenderStyle.h:
1754         * rendering/style/ShadowData.cpp:
1755         * rendering/style/ShadowData.h:
1756         * rendering/style/StyleCachedImageSet.h:
1757         * rendering/style/StyleImage.h:
1758         * rendering/svg/SVGRenderSupport.h:
1759
1760 2012-11-07  Alexandru Chiculita  <achicu@adobe.com>
1761
1762         CoordinatedGraphicsArgumentCoders should use ValidatedCustomFitlerOperation instead
1763         https://bugs.webkit.org/show_bug.cgi?id=100905
1764
1765         Reviewed by Noam Rosenthal.
1766
1767         Added getters for the validated shaders, so that platform code could extract them.
1768
1769         No new tests, just added two getters.
1770
1771         * platform/graphics/filters/CustomFilterValidatedProgram.h:
1772         (WebCore::CustomFilterValidatedProgram::validatedVertexShader):
1773         (WebCore::CustomFilterValidatedProgram::validatedFragmentShader):
1774         (CustomFilterValidatedProgram):
1775
1776 2012-11-07  Joshua Bell  <jsbell@chromium.org>
1777
1778         IndexedDB: Assertion failure with open() within upgradeneeded
1779         https://bugs.webkit.org/show_bug.cgi?id=96947
1780
1781         Reviewed by Dimitri Glazkov.
1782
1783         Postpone creation of the "pending second half open" until the version change
1784         transaction has started.
1785
1786         Test: storage/indexeddb/unblocked-version-changes.html
1787
1788         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1789         (WebCore::IDBDatabaseBackendImpl::setIntVersionInternal):
1790         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
1791         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1792         (IDBDatabaseBackendImpl):
1793         * Modules/indexeddb/IDBDatabaseCallbacks.h:
1794
1795 2012-11-07  Alexandru Chiculita  <achicu@adobe.com>
1796
1797         [CSS Shaders] Add CustomFilterMeshBoxType to ValidatedCustomFilterOperation
1798         https://bugs.webkit.org/show_bug.cgi?id=100890
1799
1800         Reviewed by Dean Jackson.
1801
1802         Added the CustomFilterMeshBoxType parameter to the ValidatedCustomFilterOperation.
1803
1804         No new tests, this parameter is not used in the implementation yet.
1805
1806         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
1807         (WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
1808         * platform/graphics/filters/ValidatedCustomFilterOperation.h:
1809         (WebCore::ValidatedCustomFilterOperation::create):
1810         (WebCore::ValidatedCustomFilterOperation::meshBoxType):
1811         (WebCore::ValidatedCustomFilterOperation::operator==):
1812         (ValidatedCustomFilterOperation):
1813         * rendering/FilterEffectRenderer.cpp:
1814         (WebCore::createCustomFilterEffect):
1815         * rendering/RenderLayer.cpp:
1816         (WebCore::RenderLayer::computeFilterOperations):
1817
1818 2012-11-07  Sergio Villar Senin  <svillar@igalia.com>
1819
1820         [Qt] Implement deleteCookie() for persistent storage
1821         https://bugs.webkit.org/show_bug.cgi?id=101272
1822
1823         Reviewed by Jocelyn Turcotte.
1824
1825         Individual cookies were never persistently cleared as the
1826         deleteCookie() virtual method was not implemented for persistent
1827         storage. That's why cookies were only deleted for the current
1828         session.
1829
1830         * platform/qt/CookieJarQt.cpp:
1831         (WebCore::SharedCookieJarQt::deleteCookie):
1832         (WebCore): added deleteCookie() implementation for persistent
1833         storage.
1834         * platform/qt/CookieJarQt.h:
1835         (SharedCookieJarQt):
1836
1837 2012-11-07  Shinya Kawanaka  <shinyak@chromium.org>
1838
1839         [Shadow] Style should update when 'pseudo' attribute is dynamically updated
1840         https://bugs.webkit.org/show_bug.cgi?id=100918
1841
1842         Reviewed by Dimitri Glazkov.
1843
1844         When 'pseudo' attribute is changed and its element is in ShadowTree, we enable the styleShouldRecalc flag.
1845
1846         It would be fast if we have a set of pseudo attribute style value in RuleFeatureSet,
1847         but it might consume a lot of memory.
1848
1849         Test: fast/dom/shadow/pseudo-attribute-dynamic.html
1850
1851         * dom/Element.cpp:
1852         (WebCore::Element::attributeChanged):
1853
1854 2012-11-07  Ulan Degenbaev  <ulan@chromium.org>
1855
1856         [V8] WebKit sends unnecessary low memory notification when running memory benchmarks
1857         https://bugs.webkit.org/show_bug.cgi?id=101474
1858
1859         Reviewed by Kentaro Hara.
1860
1861         Do not send low memory notification to V8 when most of memory usage
1862         comes from V8 heap and not DOM objects. In this case V8 can schedule GC
1863         itself more optimally.
1864
1865         * bindings/v8/V8GCController.cpp:
1866         (WebCore::V8GCController::checkMemoryUsage):
1867
1868 2012-11-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1869
1870         [Qt] Open link in this window action
1871         https://bugs.webkit.org/show_bug.cgi?id=101226
1872
1873         Reviewed by Simon Hausmann.
1874
1875         Adds the action to the WebCore context-menu controller.
1876
1877         * page/ContextMenuController.cpp:
1878         (WebCore::ContextMenuController::contextMenuItemSelected):
1879         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1880         * platform/ContextMenuItem.h:
1881         * platform/LocalizedStrings.h:
1882         * platform/qt/LocalizedStringsQt.cpp:
1883         (WebCore::contextMenuItemTagOpenLinkInThisWindow):
1884
1885 2012-11-07  Andrey Adaikin  <aandrey@chromium.org>
1886
1887         Web Inspector: [Canvas] closure compiler fixes
1888         https://bugs.webkit.org/show_bug.cgi?id=101459
1889
1890         Reviewed by Pavel Feldman.
1891
1892         * inspector/InjectedScriptCanvasModuleSource.js:
1893         (.):
1894
1895 2012-11-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1896
1897         Unreviewed, rolling out r133712.
1898         http://trac.webkit.org/changeset/133712
1899         https://bugs.webkit.org/show_bug.cgi?id=101461
1900
1901         Broke fast/forms/time* tests on chromium-win. (Requested by
1902         mkwst on #webkit).
1903
1904         * platform/text/win/LocaleWin.cpp:
1905         (WebCore::DateFormatToken::DateFormatToken):
1906         (DateFormatToken):
1907         (WebCore):
1908         (WebCore::isEraSymbol):
1909         (WebCore::isYearSymbol):
1910         (WebCore::isMonthSymbol):
1911         (WebCore::isDaySymbol):
1912         (WebCore::commitLiteralToken):
1913         (WebCore::parseDateFormat):
1914         (WebCore::LocaleWin::ensureShortDateTokens):
1915         (WebCore::convertWindowsDateFormatToLDML):
1916         (WebCore::mapCharacterToDateTimeFieldType):
1917         (WebCore::convertWindowsTimeFormatToLDML):
1918         (WebCore::LocaleWin::dateFormat):
1919         (WebCore::LocaleWin::monthFormat):
1920         (WebCore::LocaleWin::timeFormat):
1921         (WebCore::LocaleWin::shortTimeFormat):
1922         * platform/text/win/LocaleWin.h:
1923         (LocaleWin):
1924
1925 2012-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
1926
1927         Web Inspector: [Regression] Editing formatted source should not be allowed.
1928         https://bugs.webkit.org/show_bug.cgi?id=101355
1929
1930         Reviewed by Pavel Feldman.
1931
1932         * inspector/front-end/JavaScriptSourceFrame.js:
1933         (WebInspector.JavaScriptSourceFrame.prototype._onFormattedChanged):
1934         * inspector/front-end/UISourceCodeFrame.js:
1935         (WebInspector.UISourceCodeFrame.prototype._onFormattedChanged):
1936
1937 2012-11-07  Shinya Kawanaka  <shinyak@chromium.org>
1938
1939         [Shadow] Use setPseudo() instead of setShadowPseudoId().
1940         https://bugs.webkit.org/show_bug.cgi?id=101306
1941
1942         Reviewed by Kent Tamura.
1943
1944         We would like to remove setShadowPseudoId() and use setPseudo() instead, since ShadowDOM spec now has
1945         'pseudo' attribute.
1946
1947         We change all setShadowPseudoId() invocation to setPseudo() invocation. Also, when AtomicString is not
1948         constructed with AtomicStringFromLiteral, we use it.
1949
1950         No new tests, refactoring.
1951
1952         * WebCore.exp.in:
1953         * dom/Element.cpp:
1954         * dom/Element.h:
1955         (Element):
1956         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1957         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
1958         * html/ColorInputType.cpp:
1959         (WebCore::ColorInputType::createShadowSubtree):
1960         * html/HTMLTextAreaElement.cpp:
1961         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
1962         * html/RangeInputType.cpp:
1963         (WebCore::RangeInputType::createShadowSubtree):
1964         * html/TextFieldInputType.cpp:
1965         (WebCore::TextFieldInputType::createShadowSubtree):
1966         (WebCore::TextFieldInputType::updatePlaceholderText):
1967         * html/ValidationMessage.cpp:
1968         (WebCore::ValidationMessage::buildBubbleTree):
1969         * html/shadow/DateTimeEditElement.cpp:
1970         (WebCore::DateTimeEditBuilder::visitLiteral):
1971         (WebCore::DateTimeEditElement::DateTimeEditElement):
1972         * html/shadow/DateTimeFieldElement.cpp:
1973         (WebCore::DateTimeFieldElement::initialize):
1974         * html/shadow/DateTimeFieldElement.h:
1975         (DateTimeFieldElement):
1976         * html/shadow/PickerIndicatorElement.cpp:
1977         (WebCore::PickerIndicatorElement::PickerIndicatorElement):
1978         * html/track/TextTrackCue.cpp:
1979         (WebCore::TextTrackCueBox::TextTrackCueBox):
1980         (WebCore::TextTrackCue::updateDisplayTree):
1981         * testing/Internals.cpp:
1982         (WebCore::Internals::setShadowPseudoId):
1983
1984 2012-11-07  Andrey Adaikin  <aandrey@chromium.org>
1985
1986         Web Inspector: [Canvas] Save CanvasGradient objects state for a replay
1987         https://bugs.webkit.org/show_bug.cgi?id=101432
1988
1989         Reviewed by Pavel Feldman.
1990
1991         Save CanvasGradient resource state for a subsequent replay. The gradient's state is modified by the gradient.addColorStop() call.
1992
1993         Test: inspector/profiler/canvas2d/canvas2d-gradient-capturing.html
1994
1995         * inspector/InjectedScriptCanvasModuleSource.js:
1996         (.):
1997
1998 2012-11-07  Vsevolod Vlasov  <vsevik@chromium.org>
1999
2000         Web Inspector: [Regression] Snippets evaluations should not appear in Sources tab of navigator.
2001         https://bugs.webkit.org/show_bug.cgi?id=101354
2002
2003         Reviewed by Pavel Feldman.
2004
2005         * inspector/front-end/DebuggerScriptMapping.js:
2006         * inspector/front-end/NetworkUISourceCodeProvider.js:
2007         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
2008         * inspector/front-end/Script.js:
2009         (WebInspector.Script.prototype.isSnippet):
2010         * inspector/front-end/ScriptSnippetModel.js:
2011         (WebInspector.ScriptSnippetModel.prototype._snippetIdForSourceURL):
2012
2013 2012-11-07  Dan Carney  <dcarney@google.com>
2014
2015         [V8] Cleanup V8DOMWrapper::getCachedWrapper
2016         https://bugs.webkit.org/show_bug.cgi?id=100853
2017
2018         Reviewed by Adam Barth.
2019
2020         Slight cleanup. Removed redundant branch.
2021
2022         No new tests. No change in functionality.
2023
2024         * bindings/v8/V8DOMWrapper.h:
2025         (WebCore::V8DOMWrapper::getCachedWrapper):
2026
2027 2012-11-07  Simon Hausmann  <simon.hausmann@digia.com>
2028
2029         [Qt] Unreviewed trivial build fix adapting to QtMultimedia API changes
2030
2031         The QtMultimedia namespace is now called QMultimedia and
2032         QtMultimedia::MetaData is now QMediaMetaData.
2033
2034         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
2035         (WebCore::MediaPlayerPrivateQt::supportsType):
2036         (WebCore::MediaPlayerPrivateQt::totalBytes):
2037
2038 2012-11-07  Christophe Dumez  <christophe.dumez@intel.com>
2039
2040         Add replaceWithLiteral() method to WTF::String
2041         https://bugs.webkit.org/show_bug.cgi?id=101257
2042
2043         Reviewed by Benjamin Poulain.
2044
2045         Substitute String::replace() calls by String::replaceWithLiteral() where
2046         adequate, for efficiency.
2047
2048         No new tests, no behavior change.
2049
2050         * dom/Node.cpp:
2051         (WebCore::Node::showNode):
2052         * editing/EditingStyle.cpp:
2053         (WebCore::StyleChange::extractTextStyles):
2054         * editing/MarkupAccumulator.cpp:
2055         (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
2056         * html/HTMLAnchorElement.cpp:
2057         (WebCore::HTMLAnchorElement::setSearch):
2058         * loader/FormSubmission.cpp:
2059         (WebCore::appendMailtoPostFormDataToURL):
2060         * platform/network/soup/ProxyResolverSoup.cpp:
2061         (soupProxyResolverWkSetProperty):
2062         * plugins/PluginView.cpp:
2063         (WebCore::makeURL):
2064         * rendering/InlineTextBox.cpp:
2065         (WebCore::InlineTextBox::showBox):
2066         * xml/XSLTProcessor.cpp:
2067         (WebCore::transformTextStringToXHTMLDocumentString):
2068
2069 2012-11-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2070
2071         Remove support for "desktop-width" in the viewport meta tag
2072         https://bugs.webkit.org/show_bug.cgi?id=101217
2073
2074         Reviewed by Gyuyoung Kim.
2075
2076         This has been removed from the CSS Device Adaptation spec, and
2077         should be safe to remove as it is not documented anywhere (neither
2078         in blog posts).
2079
2080         The viewport meta should only support the legacy features.
2081
2082         * dom/ViewportArguments.cpp:
2083         (WebCore::computeViewportAttributes):
2084         (WebCore::findSizeValue):
2085         (WebCore::findScaleValue):
2086         (WebCore::findUserScalableValue):
2087         * dom/ViewportArguments.h:
2088
2089 2012-11-07  Dominik Röttsches  <dominik.rottsches@intel.com>
2090
2091         [EFL] Fix execution of exif-orientation-image-document.html on EFL Wk2 bot
2092         https://bugs.webkit.org/show_bug.cgi?id=101343
2093
2094         Reviewed by Kenneth Rohde Christiansen.
2095
2096         Add Cairo to the list of backends that support shouldRespectImageOrientation.
2097
2098         No new tests, fixes exif-orientation-image-document.html.
2099
2100         * rendering/RenderObject.cpp:
2101         (WebCore::RenderObject::shouldRespectImageOrientation):
2102
2103 2012-11-06  Yury Semikhatsky  <yurys@chromium.org>
2104
2105         Console not displaying all properties of an Object once native Constructor overwritten
2106         https://bugs.webkit.org/show_bug.cgi?id=101320
2107
2108         Reviewed by Pavel Feldman.
2109
2110         Use Object instance from {}.constructor when formatting inspector messages in the
2111         injected script. Otherwise inspected page may overwrite Object value and break inspector.
2112
2113         Test: inspector/console/console-Object-overwritten.html
2114
2115         * inspector/InjectedScriptSource.js:
2116
2117 2012-11-06  Keishi Hattori  <keishi@webkit.org>
2118
2119         Implement month picking to calendar picker
2120         https://bugs.webkit.org/show_bug.cgi?id=101333
2121
2122         Reviewed by Kent Tamura.
2123
2124         This adds month picker mode to CalendarPicker.
2125
2126         No new tests. Tests will be added later when this feature is enabled in DRT.
2127
2128         * Resources/pagepopups/calendarPicker.css:
2129         (.month-mode .day): Remove rounded corners when in month mode.
2130         * Resources/pagepopups/calendarPicker.js:
2131         (Month.createFromToday): Creates month containing today.
2132         (CalendarPicker): Set this.selectionConstructor to Day or Month depending on the mode. Create DayTables or MonthPickerDaysTable depending on the mode.
2133         (CalendarPicker.prototype.handleToday):
2134         (CalendarPicker.prototype._layoutButtons):
2135         (DaysTable.prototype._renderMonth): Set element.dataset.monthValue for all date nodes.
2136         (DaysTable.prototype._markRangeAsSelected): Marks all day nodes in range as selected.
2137         (DaysTable.prototype.selectRange): Selects a day.
2138         (DaysTable.prototype.selectRangeAndShowEntireRange): Same as selectRange.
2139         (DaysTable.prototype._selectRangeContainingNode):
2140         (DaysTable.prototype._rangeForNode): Returns Day for node.
2141         (DaysTable.prototype.startDate): Start datetime of visible date range. This value is inclusive.
2142         (DaysTable.prototype.endDate): End datetime of visible date range. This value is exclusive.
2143         (DaysTable.prototype._handleKey):
2144         (MonthPickerDaysTable):
2145         (MonthPickerDaysTable.prototype._markRangeAsSelected): Marks all day nodes in range as selected.
2146         (MonthPickerDaysTable.prototype.selectRange): Selects month. If month is not visible, navigates to that month.
2147         (MonthPickerDaysTable.prototype.selectRangeAndShowEntireRange): Selects month. Navigates to the month.
2148         (MonthPickerDaysTable.prototype._rangeForNode): Returns Month for node.
2149         (MonthPickerDaysTable.prototype._handleKey): Arrow keys simply move the selection forwards or backwards.
2150
2151 2012-11-06  Dan Beam  <dbeam@chromium.org>
2152
2153         Enable REQUEST_AUTOCOMPLETE for chromium port
2154         https://bugs.webkit.org/show_bug.cgi?id=101376
2155
2156         Reviewed by Adam Barth.
2157
2158         Added a runtime enabled feature to control whether HTMLFormElement#requestAutocomplete is visible from JavaScript.
2159
2160         * bindings/generic/RuntimeEnabledFeatures.cpp:
2161         (WebCore):
2162         * bindings/generic/RuntimeEnabledFeatures.h:
2163         (RuntimeEnabledFeatures):
2164
2165         Added a binding from RuntimeEnabledFeatures that triggers [V8EnabledAtRuntime=requestAutocomplete].
2166
2167         (WebCore::RuntimeEnabledFeatures::requestAutocompleteEnabled):
2168
2169         Added a getter to WebCore to ask whether the runtime flag requestAutocomplete is on.
2170
2171         (WebCore::RuntimeEnabledFeatures::setRequestAutocompleteEnabled):
2172
2173         Added a setter to WebCore to affect the runtime flag requestAutocomplete.
2174
2175         * html/HTMLFormElement.idl:
2176
2177         Wrapped commonly grouped features in an #if defined(ENABLED_REQUEST_AUTOCOMPLETE) block and added [V8EnableAtRuntime]
2178         so these features can be changed with a command line switch in the chromium port.
2179
2180 2012-11-06  Adam Barth  <abarth@webkit.org>
2181
2182         [V8] Unify setJSWrapperForDOMObject and setJSWrapperForDOMNode
2183         https://bugs.webkit.org/show_bug.cgi?id=101422
2184
2185         Reviewed by Kentaro Hara.
2186
2187         This patch is another incremental step towards the patch in Bug 10110.
2188         In this step, we unify setJSWrapperForDOMObject and
2189         setJSWrapperForDOMNode.
2190
2191         * bindings/scripts/CodeGeneratorV8.pm:
2192         (GenerateHeader):
2193         (GenerateNormalAttrGetter):
2194         (GenerateConstructorCallback):
2195         (GenerateNamedConstructorCallback):
2196         (GenerateToV8Converters):
2197         * bindings/scripts/test/V8/V8Float64Array.h:
2198         (WebCore::V8Float64Array::wrap):
2199         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2200         (WebCore::V8TestActiveDOMObject::wrap):
2201         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2202         (WebCore::V8TestCustomNamedGetter::wrap):
2203         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2204         (WebCore::V8TestEventConstructor::wrap):
2205         * bindings/scripts/test/V8/V8TestEventTarget.h:
2206         (WebCore::V8TestEventTarget::wrap):
2207         * bindings/scripts/test/V8/V8TestException.h:
2208         (WebCore::V8TestException::wrap):
2209         * bindings/scripts/test/V8/V8TestInterface.h:
2210         (WebCore::V8TestInterface::wrap):
2211         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2212         (WebCore::V8TestMediaQueryListListener::wrap):
2213         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2214         (WebCore::V8TestNamedConstructor::wrap):
2215         * bindings/scripts/test/V8/V8TestNode.cpp:
2216         (WebCore::V8TestNode::constructorCallback):
2217         (WebCore::V8TestNode::wrapSlow):
2218         * bindings/scripts/test/V8/V8TestObj.cpp:
2219         (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
2220         * bindings/scripts/test/V8/V8TestObj.h:
2221         (WebCore::V8TestObj::wrap):
2222         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2223         (WebCore::V8TestSerializedScriptValueInterface::wrap):
2224         * bindings/v8/DOMDataStore.cpp:
2225         (WebCore::DOMDataStore::current):
2226         * bindings/v8/DOMDataStore.h:
2227         (WebCore::DOMDataStore::get):
2228         (DOMDataStore):
2229         * bindings/v8/V8DOMWrapper.cpp:
2230         * bindings/v8/V8DOMWrapper.h:
2231         (V8DOMWrapper):
2232         (WebCore::V8DOMWrapper::setJSWrapperPrivate):
2233         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
2234         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2235         (WebCore::v8HTMLImageElementConstructorCallback):
2236
2237 2012-11-06  Ken Buchanan  <kenrb@chromium.org>
2238
2239         Crash due to column span under button element
2240         https://bugs.webkit.org/show_bug.cgi?id=101402
2241
2242         Reviewed by Abhishek Arya.
2243
2244         When there is a column-spanning child of a RenderButton
2245         splitBlocks() must split the RenderButton as well as its
2246         only permitted direct child, the anonymous block referenced
2247         by m_inner. A crash was occurring because splitBlocks()
2248         calls addChildIgnoringAnonymousColumnBlocks() to add the
2249         cloned m_inner to the cloned RenderButton, which meant the
2250         m_inner for the cloned RenderButton was not being set even
2251         though a child was being added. This violates state
2252         assumptions in the RenderButton code.
2253
2254         This patch prevents any descendants of RenderButton from
2255         spanning columns. Also, it adds a precautionary check in
2256         RenderButton::removeChild() to mitigate problems if similar
2257         state problems are found in future.
2258
2259         * rendering/RenderBlock.cpp:
2260         (WebCore::RenderBlock::containingColumnsBlock):
2261         * rendering/RenderButton.cpp:
2262         (WebCore::RenderButton::removeChild):
2263
2264 2012-11-06  Shinya Kawanaka  <shinyak@chromium.org>
2265
2266         [Shadow] Pseudo custom-elements should start with 'x-'.
2267         https://bugs.webkit.org/show_bug.cgi?id=100919
2268
2269         Reviewed by Dimitri Glazkov.
2270
2271         Pseuco custom-elements should start with 'x-'. 'Pseudo' starting with '-webkit-' should work
2272         only in UserAgent ShadowDOM. If it's used in Author ShadowDOM, it should not work.
2273
2274         Test: fast/dom/shadow/pseudo-attribute-rendering.html
2275
2276         * css/SelectorChecker.cpp:
2277         (WebCore::SelectorChecker::checkSelector): Added ShadowRoot type check.
2278
2279 2012-11-06  Chris Evans  <cevans@google.com>
2280
2281         Re-order variables in BidiRun and LayoutState
2282         https://bugs.webkit.org/show_bug.cgi?id=100173
2283
2284         Reviewed by Eric Seidel.
2285
2286         The variable re-ordering and use of bitfields for bools has two benefits:
2287         1) Size reduction. sizeof(BidiRun) goes down from 48 to 40 bytes on 64-bit. This is achieved by removing a bool member variable from BidiRun and packing it together with other bools in the BidiCharacterRun base class.
2288         2) Security improvement. We have a lot of use-after-free in the RenderObject hierarchy, and the RenderArena class protects us from a lot of trouble by ensuring that objects of arbitrary type cannot be overlayed on top of freed RenderObjects. This change additionally makes sure that non-virtual RenderArena allocated objects do not have member variables which fully overlap the freed vtable pointer. This leaves re-used vtable pointers always pointing to either a valid vtable or an invalid address due to the freelist high-bit poisoning.
2289
2290         This change is exclusively about size savings; it is performance neutral as you would expect, including on Parser/html5-full-render.html
2291
2292         * platform/text/BidiResolver.h:
2293         (WebCore::BidiCharacterRun::BidiCharacterRun): impact from re-ordering members.
2294         (BidiCharacterRun): provide an efficiently packed bit of storage for BidiRun subclass to use, and re-order members to place bools adjacent.
2295         * rendering/BidiRun.h:
2296         (WebCore::BidiRun::BidiRun): use base class' efficiently packed bit storage for m_hasHyphen.
2297         (BidiRun): m_hasHyphen is now stored in the base class.
2298         * rendering/LayoutState.cpp:
2299         (WebCore::LayoutState::LayoutState):
2300         * rendering/LayoutState.h:
2301         (WebCore::LayoutState::LayoutState): impact from re-ordering members.
2302         (LayoutState): re-order members to place bools adjacently.
2303
2304 2012-11-06  Kent Tamura  <tkent@chromium.org>
2305
2306         [Chromium-win] Refactor date/time format conversion code in LocaleWin
2307         https://bugs.webkit.org/show_bug.cgi?id=101329
2308
2309         Reviewed by Kentaro Hara.
2310
2311         convertWindowsDateFormatToLDML and convertWindowsTimeFormatToLDML did
2312         similar jobs with different code. We can merge them into one function.
2313
2314         As for the date format conversion, we have tokenized a format string and
2315         stored token objects into a vector. We skip token object generation and
2316         generate a LDML-compliant pattern string during parsing.
2317
2318         No new tests. This should make no behavior changes and
2319         WebKit/chromium/tests/LocaleWinTest.cpp has test cases.
2320
2321         * platform/text/win/LocaleWin.cpp:
2322         (WebCore): Remove DateFormatToken, isFooSymbol, ensureShortDateTokens,
2323         convertWindowsDateFormatToLDML, mapCharacterToDateTimeFieldType, and
2324         convertWindowsTimeFormatToLDML.
2325         (WebCore::commitLiteralToken): Store the result to the specified StringBuilder.
2326         (WebCore::convertWindowsDateTimeFormat):
2327         Renamed from parseDateFormat, and supports time format symbols.
2328         (WebCore::LocaleWin::dateFormat): Use convertWindowsDateTimeFormat.
2329         (WebCore::LocaleWin::monthFormat): Ditto.
2330         (WebCore::LocaleWin::timeFormat): Ditto.
2331         (WebCore::LocaleWin::shortTimeFormat): Ditto.
2332         * platform/text/win/LocaleWin.h:
2333         (LocaleWin): Remove ensureShortDateTokens and m_shortDateTokens.
2334
2335 2012-11-06  Elliott Sprehn  <esprehn@chromium.org>
2336
2337         Make Document::renderer faster by using the cached ptr for RenderView
2338         https://bugs.webkit.org/show_bug.cgi?id=101409
2339
2340         Reviewed by Eric Seidel.
2341
2342         In Bug 101277 I made Document::renderView() just return m_renderView instead
2343         of casting the result of renderer(). While this made renderView() cheaper it
2344         makes more sense to just make renderer() faster for Document pointers and
2345         go back to the out of line method in RenderView.h because lots of places in
2346         the code do document()->renderer().
2347
2348         No new tests, this is just a refactor.
2349
2350         * dom/Document.h:
2351         (WebCore::Document::renderer):
2352         * rendering/RenderView.h:
2353         (WebCore::Document::renderView):
2354
2355 2012-11-06  Adam Barth  <abarth@webkit.org>
2356
2357         [V8] neuterBinding should remember the type of its argument
2358         https://bugs.webkit.org/show_bug.cgi?id=101413
2359
2360         Reviewed by Kentaro Hara.
2361
2362         This is a small part of the patch in
2363         https://bugs.webkit.org/show_bug.cgi?id=101110 that we can land
2364         separately to try to tease out what is causing the memory regression.
2365
2366         * bindings/v8/SerializedScriptValue.cpp:
2367         (WebCore):
2368         (WebCore::neuterBinding):
2369
2370 2012-11-06  Alexey Proskuryakov  <ap@apple.com>
2371
2372         Clean up which storage cookie jar functions use
2373         https://bugs.webkit.org/show_bug.cgi?id=101395
2374
2375         Reviewed by Brady Eidson.
2376
2377         * WebCore.exp.in:
2378         * platform/mac/WebCoreSystemInterface.h:
2379         * platform/mac/WebCoreSystemInterface.mm:
2380         Updated for two new WKSI functions.
2381
2382         * platform/CookieJar.h: Added explanatory comments.
2383
2384         * platform/mac/CookieJar.mm:
2385         (WebCore::cookies): Removed fallback on NSHTTPCookieStorage, the WKSI function
2386         already implements it.
2387         (WebCore::cookieRequestHeaderFieldValue): Ditto.
2388         (WebCore::setCookies): Ditto.
2389         (WebCore::cookiesEnabled): Ditto.
2390         (WebCore::getRawCookies): Ditto.
2391         (WebCore::deleteCookie): Ditto.
2392         (WebCore::getHostnamesWithCookies): This function used to look at NSHTTPCookieStorage
2393         exclusively. While it makes sense to bypass private storage session, default storage
2394         session (currently only used for testing on Mac) is never OK to bypass. Changed to
2395         use a WKSI function that supports both.
2396         (WebCore::deleteCookiesForHostname): Ditto.
2397         (WebCore::deleteAllCookies): Ditto.
2398
2399         * platform/network/cf/CookieJarCFNet.cpp:
2400         (WebCore::getHostnamesWithCookies):
2401         (WebCore::deleteCookiesForHostname):
2402         (WebCore::deleteAllCookies):
2403         Updated to match Foundation, so now these functions bypass private session.
2404
2405         * platform/network/cf/CookieStorageCFNet.cpp:
2406         (WebCore::currentCFHTTPCookieStorage): Updated a comment.
2407         (WebCore::defaultCFHTTPCookieStorage):  Added a function that returns cookie storage
2408         for non-private session (or null if that would be an NSHTTPCookieStorage).        
2409         (WebCore::startObservingCookieChanges): We do not want to observe private cookies
2410         here, and we certainly don't want a mismatch between start/stop due to private
2411         browsing mode changes.
2412         (WebCore::stopObservingCookieChanges): Ditto.
2413
2414         * platform/network/cf/CookieStorageCFNet.h: Added defaultCFHTTPCookieStorage().
2415
2416 2012-11-06  Huang Dongsung  <luxtella@company100.net>
2417
2418         Build fix. r133601 broke the Windows build.
2419         https://bugs.webkit.org/show_bug.cgi?id=101404
2420
2421         Reviewed by Noam Rosenthal.
2422
2423         Only static const integral data members can be initialized within a class in the
2424         Windows, so we initialize static const double date members out of the class.
2425
2426         * platform/graphics/texmap/TextureMapper.cpp:
2427         (BitmapTexturePool):
2428         (WebCore):
2429
2430 2012-11-06  Simon Fraser  <simon.fraser@apple.com>
2431
2432         -webkit-background-clip:text produces artifacts when applied to the body and the browser is resized
2433         https://bugs.webkit.org/show_bug.cgi?id=89287
2434
2435         Reviewed by Beth Dakin.
2436
2437         If the body had -webkit-background-clip: text, we'd fail to paint
2438         anything behind it, so would see garbage pixels.
2439         
2440         Fix by having RenderView::paintBoxDecorations() check for a background-clip of "text"
2441         on the renderer that paints the root background.
2442         
2443         Added some new pixel tests for combinations of html and body transform
2444         and backgrounds; earlier versions of the patch broke some of these tests.
2445
2446         Tests: fast/backgrounds/background-clip-text-on-body.html
2447                fast/backgrounds/transformed-body-background.html
2448                fast/backgrounds/transformed-body-html-background.html
2449                fast/backgrounds/transformed-html-body-background.html
2450
2451         * rendering/RenderView.cpp:
2452         (WebCore::rendererObscuresBackground): Broke up the single condition
2453         into early 'false' returns when possible. We need to also check whether
2454         the renderer that actually paints the background (which might be the body)
2455         will fill it; background-clip: text does not.
2456         (WebCore::RenderView::paintBoxDecorations): Rather than checking firstChild(),
2457         actually check the root renderer, so that we can reliably get to the renderer
2458         that mains the root background.
2459
2460 2012-11-06  Stephen White  <senorblanco@chromium.org>
2461
2462         Implement save and restore for a bunch of InternalSettings state
2463         https://bugs.webkit.org/show_bug.cgi?id=101394
2464
2465         Reviewed by Dirk Pranke.
2466
2467         In http://trac.webkit.org/changeset/133399, I resolved a bunch of 
2468         flaky tests by saving and restoring the InternalSettings state
2469         EnableCompositingForFixedPosition.  On a hunch, I git grepped for all
2470         internal settings state which is being set by layout tests but not
2471         saved and restored.  It turns out there about 15 calls.
2472
2473         This patch takes care of five of them, mostly compositing-related.
2474         The others I was either not sure about, or were already at least
2475         being reset to known values by the testing harness.
2476
2477         Hopefully this will alleviate some further test flakiness.
2478
2479         * testing/InternalSettings.cpp:
2480         * testing/InternalSettings.h:
2481
2482 2012-11-06  KyungTae Kim  <ktf.kim@samsung.com>
2483
2484         Fix build warning in RenderLayer.cpp caused by r133628
2485         https://bugs.webkit.org/show_bug.cgi?id=101401
2486
2487         Reviewed by Simon Fraser.
2488
2489         The static function WebCore::frameViewFromLayer is only used when USE(ACCELERATED_COMPOSITING),
2490         so define it only that case for removing -Wunused-function warning
2491
2492         * rendering/RenderLayer.cpp:
2493         (WebCore):
2494
2495 2012-11-06  Hans Muller  <hmuller@adobe.com>
2496
2497         [CSS Exclusions] Store ExclusionPolygonEdge vertices in clockwise order
2498         https://bugs.webkit.org/show_bug.cgi?id=100763
2499
2500         Reviewed by Darin Adler.
2501
2502         The ExclusionPolygon's internal logic, notably getVertexIntersectionVertices(),
2503         assumes that ExclusionPolygonEdge vertices are stored in clockwise order.
2504         If this is not true, then we construct the polygon's edges in reverse.
2505
2506         To determine if the vertices are in clockwise order, we compare the slope
2507         of the line between the top,left vertex and its previous vertex, with the
2508         the slope of the line of vertices before and after the top,left vertex.
2509         If the slope of the latter is greater, then top,left vertex is located
2510         to its left, and the vertices are clockwise.
2511
2512         Test: fast/exclusions/shape-inside/shape-inside-counterclockwise-polygon.html
2513
2514         * rendering/ExclusionPolygon.cpp:
2515         (WebCore::determinant): Used to decide if the min vertex is on the left side of the line that passes through its adjacent vertices.
2516         (WebCore::ExclusionPolygon::ExclusionPolygon): If the polygon's vertices are specified in counterclockwise order, construct the edges in reverse.
2517         (WebCore::appendIntervalX): Made this an inline since it was only defined as a function for the sake of clarity.
2518
2519 2012-11-06  Tiancheng Jiang  <tijiang@rim.com>
2520
2521         [BlackBerry] Update BB10 form theme.
2522         https://bugs.webkit.org/show_bug.cgi?id=100760
2523
2524         Reviewed by Rob Buis.
2525
2526         RIM PR 238123
2527         Internal Reviewed by Chris Hutten-Czapski
2528         BB10 selection theme use slice image function to draw selection button,
2529         any border-radius setting other than 0 will make the button corner
2530         clipped. Always set button border-radius: 0 for BB10 theme.
2531
2532         * css/themeBlackBerry.css:
2533         (select[size][multiple]):
2534         (select[size="1"]):
2535
2536 2012-11-06  Elliott Sprehn  <esprehn@chromium.org>
2537
2538         Remove branch from inside RenderObject::view now that renderer() is more expensive
2539         https://bugs.webkit.org/show_bug.cgi?id=101277
2540
2541         Reviewed by Eric Seidel.
2542
2543         It was observed in Bug 100057 that calling renderer() repeatedly now that it has a branch
2544         can be a performance regression. Now that we no longer keep a separate pointer for rare data
2545         in Document, we can use that space for a pointer to the RenderView making RenderObject::view()
2546         faster and removing the branch.
2547
2548         This is a 1% improvement on Parser/html5-full-render.html
2549
2550         This also cleans up the code because it turns out we don't need to have RenderObject::view() in
2551         RenderView.h because we can just call Document::renderView() and not do toRenderView. This makes
2552         it easier to find this method as it exists in the right header file now.
2553
2554         No new tests, this is just a refactor.
2555
2556         * WebCore.exp.in: Remove export of Document::renderView since it's inline now.
2557         * dom/Document.cpp:
2558         (WebCore::Document::Document):
2559         (WebCore::Document::setRenderer):
2560         (WebCore):
2561         * dom/Document.h:
2562         (WebCore::Document::renderView):
2563         (Document):
2564         * rendering/RenderObject.h:
2565         (WebCore::RenderObject::view):
2566         * rendering/RenderView.h:
2567         (WebCore):
2568
2569 2012-11-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2570
2571         Unreviewed, rolling out r133526.
2572         http://trac.webkit.org/changeset/133526
2573         https://bugs.webkit.org/show_bug.cgi?id=101388
2574
2575         May have caused 15% memory regression in Chromium (Requested
2576         by jsbell|gardener on #webkit).
2577
2578         * UseV8.cmake:
2579         * WebCore.gypi:
2580         * bindings/scripts/CodeGeneratorV8.pm:
2581         (GenerateHeader):
2582         (GenerateNormalAttrGetter):
2583         (GenerateConstructorCallback):
2584         (GenerateNamedConstructorCallback):
2585         (GenerateToV8Converters):
2586         (GetDomMapFunction):
2587         (GetDomMapName):
2588         * bindings/scripts/test/V8/V8Float64Array.h:
2589         (WebCore::V8Float64Array::wrap):
2590         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2591         (WebCore::V8TestActiveDOMObject::wrap):
2592         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2593         (WebCore::V8TestCustomNamedGetter::wrap):
2594         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2595         (WebCore::V8TestEventConstructor::wrap):
2596         * bindings/scripts/test/V8/V8TestEventTarget.h:
2597         (WebCore::V8TestEventTarget::wrap):
2598         * bindings/scripts/test/V8/V8TestException.h:
2599         (WebCore::V8TestException::wrap):
2600         * bindings/scripts/test/V8/V8TestInterface.h:
2601         (WebCore::V8TestInterface::wrap):
2602         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2603         (WebCore::V8TestMediaQueryListListener::wrap):
2604         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2605         (WebCore::V8TestNamedConstructor::wrap):
2606         * bindings/scripts/test/V8/V8TestNode.cpp:
2607         (WebCore::V8TestNode::constructorCallback):
2608         (WebCore::V8TestNode::wrapSlow):
2609         * bindings/scripts/test/V8/V8TestObj.cpp:
2610         (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetter):
2611         * bindings/scripts/test/V8/V8TestObj.h:
2612         (WebCore::V8TestObj::wrap):
2613         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2614         (WebCore::V8TestSerializedScriptValueInterface::wrap):
2615         * bindings/v8/DOMDataStore.cpp:
2616         (WebCore::DOMDataStore::DOMDataStore):
2617         (WebCore::DOMDataStore::~DOMDataStore):
2618         (WebCore::DOMDataStore::current):
2619         (WebCore::DOMDataStore::reportMemoryUsage):
2620         * bindings/v8/DOMDataStore.h:
2621         (WebCore::DOMDataStore::domNodeMap):
2622         (WebCore::DOMDataStore::domObjectMap):
2623         (DOMDataStore):
2624         * bindings/v8/DOMWrapperMap.h:
2625         (WebCore):
2626         (DOMWrapperMap):
2627         (WebCore::DOMWrapperMap::~DOMWrapperMap):
2628         (WebCore::DOMWrapperHashMap::remove):
2629         * bindings/v8/DOMWrapperWorld.h:
2630         * bindings/v8/IntrusiveDOMWrapperMap.h: Copied from Source/WebKit/chromium/src/WebScriptController.cpp.
2631         (WebCore):
2632         (IntrusiveDOMWrapperMap):
2633         (WebCore::IntrusiveDOMWrapperMap::weakCallback):
2634         * bindings/v8/ScriptProfiler.cpp:
2635         * bindings/v8/SerializedScriptValue.cpp:
2636         (WebCore::neuterBinding):
2637         * bindings/v8/V8DOMMap.cpp: Copied from Source/WebKit/chromium/src/WebScriptController.cpp.
2638         (WebCore):
2639         (WebCore::getDOMNodeMap):
2640         (WebCore::getDOMObjectMap):
2641         * bindings/v8/V8DOMMap.h: Copied from Source/WebKit/chromium/src/WebScriptController.cpp.
2642         (WebCore):
2643         * bindings/v8/V8DOMWindowShell.cpp:
2644         * bindings/v8/V8DOMWrapper.cpp:
2645         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
2646         (WebCore):
2647         * bindings/v8/V8DOMWrapper.h:
2648         (V8DOMWrapper):
2649         (WebCore::V8DOMWrapper::getCachedWrapper):
2650         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
2651         * bindings/v8/V8GCController.cpp:
2652         * bindings/v8/V8NPObject.cpp:
2653         * bindings/v8/WorkerContextExecutionProxy.cpp:
2654         * bindings/v8/WorkerScriptController.cpp:
2655         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2656         (WebCore::v8HTMLImageElementConstructorCallback):
2657
2658 2012-11-06  Alexey Proskuryakov  <ap@apple.com>
2659
2660         Some cookie code cleanup
2661         https://bugs.webkit.org/show_bug.cgi?id=101375
2662
2663         Reviewed by Dan Bernstein.
2664
2665         * platform/CookieJar.h: Fixed style. Grouped functions by which storage they operate
2666         on in Mac port, but didn't add explanatory comments yet, because this is different
2667         in some ports.
2668
2669         * platform/mac/CookieJar.mm:
2670         (WebCore): Removed special code for isHTTPOnly, it's present in Foundation in all
2671         supported OS X versions.
2672         (WebCore::filterCookies): Use -isHTTPOnly directly.
2673         (WebCore::cookies): Get rid of a variable for URL, implicit conversion works just as well.
2674         (WebCore::cookieRequestHeaderFieldValue): Ditto.
2675         (WebCore::setCookies): Assert that no more than one cookie was created from one
2676         Set-Cookie header, document.cookie can only be used to set one cookie at a time.
2677         (WebCore::getRawCookies): Removed useless local variables.
2678
2679         * platform/network/CookieStorage.h: Removed an unneeded include, clarified a comment.
2680
2681         * platform/network/HTTPHeaderMap.h: Added a FIXME.
2682
2683 2012-11-06  John Griggs  <jgriggs@rim.com>
2684
2685         Implement MediaPlayerPrivate::didLoadingProgress for BlackBerry platform
2686         https://bugs.webkit.org/show_bug.cgi?id=100378
2687
2688         Reviewed by Eric Carlson.
2689
2690         Implement this method for BlackBerry platform.
2691
2692         New test: LayoutTests/media/progress-events-generated-correctly.html
2693
2694         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2695         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2696         (WebCore::MediaPlayerPrivate::didLoadingProgress):
2697         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
2698         (MediaPlayerPrivate):
2699
2700 2012-11-06  Adam Barth  <abarth@webkit.org>
2701
2702         DOMImplementation should use ScriptWrappable
2703         https://bugs.webkit.org/show_bug.cgi?id=101279
2704
2705         Reviewed by Eric Seidel.
2706
2707         This patch makes DOMImplementation ScriptWrappable. Both the V8 and JSC
2708         bindings automatically detect the presence of this base class and use
2709         it to optimize getting and setting JavaScript wrappers.
2710
2711         This patch is a 23% progression on Bindings/document-implementation for
2712         the V8 bindings and a 69% progression for the JSC bindings.
2713
2714         * dom/DOMImplementation.h:
2715
2716 2012-11-06  Benjamin Poulain  <benjamin@webkit.org>
2717
2718         Speed up TransformationMatrix::multiply() on modern ARM
2719         https://bugs.webkit.org/show_bug.cgi?id=101084
2720
2721         Reviewed by Gavin Barraclough.
2722
2723         The main improvements are:
2724         -Store the full source matrix in the registers d16 to d31. This way we avoid going
2725          back and forth to memory to use the operands.
2726          Since the full matrix is in register, we can also directly modify the memory of m_matrix,
2727          we no longer need the temporary matrix memcopied at the end.
2728         -Use of LoadMultiple and StoreMultiple to load-store the matrix parameters.
2729         -Use Multiply-Accumulate instead of VMUL followed by VADD. This half the number of instruction.
2730         -On regular ARMv7, using a loop to reuse the same code for each row also improve the performance.
2731
2732         Depending on the hardware, the new code takes 20% to 42% less time than the basic implementation.
2733
2734         * platform/graphics/transforms/TransformationMatrix.cpp:
2735         (WebCore::TransformationMatrix::multiply):
2736         * platform/graphics/transforms/TransformationMatrix.h:
2737         (TransformationMatrix):
2738
2739 2012-11-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2740
2741         Unreviewed, rolling out r133529 and r133562.
2742         http://trac.webkit.org/changeset/133529
2743         http://trac.webkit.org/changeset/133562
2744         https://bugs.webkit.org/show_bug.cgi?id=101371
2745
2746         Caused 15% memory regression on Chromium page cyclers
2747         (Requested by jsbell|gardener on #webkit).
2748
2749         * platform/text/LineBreakIteratorPoolICU.h:
2750         (WebCore::LineBreakIteratorPool::take):
2751         (WebCore::LineBreakIteratorPool::put):
2752         (LineBreakIteratorPool):
2753         * platform/text/TextBreakIterator.cpp:
2754         (WebCore::acquireLineBreakIterator):
2755         * platform/text/TextBreakIterator.h:
2756         (WebCore):
2757         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
2758         (WebCore::LazyLineBreakIterator::get):
2759         (WebCore::LazyLineBreakIterator::reset):
2760         (LazyLineBreakIterator):
2761         * platform/text/TextBreakIteratorICU.cpp:
2762         (WebCore::acquireLineBreakIterator):
2763         (WebCore::releaseLineBreakIterator):
2764         * platform/text/gtk/TextBreakIteratorGtk.cpp:
2765         (WebCore::setUpIterator):
2766         (WebCore::acquireLineBreakIterator):
2767         * platform/text/wince/TextBreakIteratorWinCE.cpp:
2768         (WebCore::acquireLineBreakIterator):
2769         * rendering/RenderBlockLineLayout.cpp:
2770         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
2771         * rendering/RenderText.cpp:
2772         (WebCore::RenderText::computePreferredLogicalWidths):
2773         * rendering/RenderText.h:
2774         (WebCore):
2775         * rendering/break_lines.cpp:
2776         (WebCore):
2777         (WebCore::isBreakableSpace):
2778         (WebCore::needsLineBreakIterator):
2779         (WebCore::nextBreakablePosition):
2780         (WebCore::nextBreakablePositionIgnoringNBSP):
2781         * rendering/break_lines.h:
2782         (WebCore):
2783         (WebCore::isBreakable):
2784
2785 2012-11-06  Peter Beverloo  <peter@chromium.org>
2786
2787         [Chromium] Enable the JavaScript i18n API for Android
2788         https://bugs.webkit.org/show_bug.cgi?id=101357
2789
2790         Reviewed by Adam Barth.
2791
2792         Remove the conditional dependency on the v8-i18n API. The library is now
2793         always available in a Chromium for Android checkout.
2794
2795         * WebCore.gyp/WebCore.gyp:
2796
2797 2012-11-06  Adam Barth  <abarth@webkit.org>
2798
2799         ScriptWrappable should work for more than just Node
2800         https://bugs.webkit.org/show_bug.cgi?id=101319
2801
2802         Reviewed by Eric Seidel.
2803
2804         This patch generalizes the inline cached wrapper code path to work with
2805         all subclasses of ScriptWrappable, not just Node.
2806
2807         * bindings/js/JSDOMBinding.h:
2808         (WebCore::setInlineCachedWrapper):
2809         (WebCore::getInlineCachedWrapper):
2810         (WebCore):
2811         (WebCore::clearInlineCachedWrapper):
2812         (WebCore::cacheWrapper):
2813         * bindings/js/JSNodeCustom.h:
2814
2815 2012-11-06  Tiancheng Jiang  <tijiang@rim.com>
2816
2817         [BlackBerry] Update BB10 form theme.
2818         https://bugs.webkit.org/show_bug.cgi?id=100760
2819
2820         Reviewed by Rob Buis.
2821
2822         Revert webkit/ce306dcc698199a6f7ce679daf0a30c25d3a3d43 slider theme
2823         change which break media control and vertical slider.
2824
2825         RIM PR 236993
2826         Internal Reviewed by Jeff Rogers.
2827
2828         * platform/blackberry/RenderThemeBlackBerry.cpp:
2829         (WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
2830         (WebCore::RenderThemeBlackBerry::paintSliderThumb):
2831
2832 2012-11-06  Michael Saboff  <msaboff@apple.com>
2833
2834         canonicalizedTitle() shouldn't convert 8 bit title strings to 16 bit
2835         https://bugs.webkit.org/show_bug.cgi?id=101105
2836
2837         Reviewed by Darin Adler.
2838
2839         Turned canonicalizedTitle() into a templated function based on character type.
2840         Changed call in updateTitle() to check the bitness of the title string to call
2841         the right template flavor of canonicalizedTitle().
2842         Made supporting changes by adding displayBufferModifiedByEncoding(LChar*, ...)
2843         and made TextEncoding::displayBuffer() a templated function as well.
2844
2845         No new tests needed, as functionality is unchanged.
2846
2847         * dom/Document.cpp:
2848         (WebCore::canonicalizedTitle):
2849         (WebCore::Document::updateTitle):
2850         (WebCore::Document::displayBufferModifiedByEncodingInternal):
2851         * dom/Document.h:
2852         (WebCore::Document::displayBufferModifiedByEncoding):
2853         * platform/text/TextEncoding.h:
2854         (TextEncoding):
2855         (WebCore::TextEncoding::displayBuffer):
2856
2857 2012-11-05  Simon Fraser  <simon.fraser@apple.com>
2858
2859         Fix RenderGeometryMap assertion when layers are scrolled during layout
2860         https://bugs.webkit.org/show_bug.cgi?id=101292
2861
2862         Reviewed by Beth Dakin.
2863
2864         When we set RenderLayer scroll positions as part of layout, we don't want
2865         to update compositing layers right away. Updating compositing layers
2866         requires that the entire layer tree has been updated from renderers,
2867         so that the geometry of all RenderLayers can be trusted. When this state
2868         was violated, RenderGeometryMap asserts.
2869         
2870         Fix by bailing from updateCompositingLayersAfterScroll() if FrameView
2871         tells us that we're doing layout. A full update of the compositing layers
2872         will happen later anyway.
2873
2874         Test: compositing/geometry/geometry-map-scroll-during-layout-assertion.html
2875
2876         * rendering/RenderLayer.cpp:
2877         (WebCore::frameViewFromLayer):
2878         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
2879
2880 2012-11-06  Michael Saboff  <msaboff@apple.com>
2881
2882         quoteCSSString() always creates a 16 bit string
2883         https://bugs.webkit.org/show_bug.cgi?id=101004
2884
2885         Reviewed by Darin Adler.
2886
2887         Added a new templated helper based on character type from the logic of quoteCSSString() to process
2888         the argument string based on its native bitness.
2889
2890         Functionality covered by existing tests.
2891
2892         * css/CSSParser.cpp:
2893         (WebCore::quoteCSSStringInternal):
2894         (WebCore::quoteCSSString):
2895
2896 2012-11-06  Andras Becsi  <andras.becsi@digia.com>
2897
2898         [Qt][WK2] Fit-to-width broken on pages with viewport meta tag
2899         https://bugs.webkit.org/show_bug.cgi?id=99715
2900
2901         Reviewed by Jocelyn Turcotte.
2902
2903         Add a bool that indicates if the content had an explicit
2904         initial-scale in the viewport meta tag.
2905
2906         * dom/ViewportArguments.cpp:
2907         (WebCore::computeViewportAttributes):
2908         * dom/ViewportArguments.h:
2909         (ViewportAttributes):
2910
2911 2012-11-06  Mike West  <mkwst@chromium.org>
2912
2913         CSP 1.1: Tweak the script interface to match the spec.
2914         https://bugs.webkit.org/show_bug.cgi?id=101321
2915
2916         Reviewed by Adam Barth.
2917
2918        This patch brings WebKit in line with the changes made to the spec in
2919        https://dvcs.w3.org/hg/content-security-policy/rev/5a29424a37d4.
2920        Specifically, the following:
2921
2922        - Renamed 'document.SecurityPolicy' to 'document.securityPolicy'
2923        - Converted the following to read-only boolean attributes:
2924          - 'allowsEval'
2925          - 'allowsInlineScript'
2926          - 'allowsInlineStyle'
2927          - 'isActive'
2928
2929         These changes only have effect for ports with CSP_NEXT enabled.
2930
2931         Tests: http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinescript.html
2932                http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowinlinestyle.html
2933
2934         * dom/Document.idl:
2935         * page/DOMSecurityPolicy.idl:
2936             Tweaking the IDL files to match the new definition of the
2937             functionlity in the spec.
2938
2939 2012-11-06  Andrey Lushnikov  <lushnikov@google.com>
2940
2941         Added console.clear() method
2942
2943         Web Inspector: add console.clear()
2944         https://bugs.webkit.org/show_bug.cgi?id=101021
2945
2946         Reviewed by Vsevolod Vlasov.
2947
2948         Adds native implementation of console.clear
2949
2950         Test: inspector/console/console-clear-function.html
2951
2952         * English.lproj/localizedStrings.js: Adds 'Console was cleared' string
2953         * inspector/ConsoleMessage.cpp:
2954         (WebCore::messageTypeValue): Adds ClearMessageType
2955         * inspector/Inspector.json:
2956         * inspector/InspectorConsoleAgent.cpp:
2957         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2958         * inspector/front-end/ConsoleMessage.js:
2959         (WebInspector.ConsoleMessageImpl.prototype._formatMessage): Display strategy for "clear" message
2960         * inspector/front-end/ConsoleModel.js:
2961         * inspector/front-end/inspector.css:
2962         (.console-info): Adds style for the 'console was cleared' message
2963         * page/Console.cpp: backend binging for console.clear()
2964         (WebCore::Console::clear):
2965         (WebCore):
2966         * page/Console.h:
2967         (Console):
2968         * page/Console.idl: Adds 'clear' message to protocol
2969         * page/ConsoleTypes.h:
2970
2971 2012-11-06  Aaron Colwell  <acolwell@chromium.org>
2972
2973         Heap-buffer-overflow in WebCore::TextTrackCueList::add
2974         https://bugs.webkit.org/show_bug.cgi?id=101018
2975
2976         Reviewed by Eric Carlson.
2977
2978         Added an extra check to avoid using a negative array index when a cue
2979         is added to the beginning of the list.
2980
2981         Test case added to LayoutTests/media/track/track-add-remove-cue.html.
2982
2983         * html/track/TextTrackCueList.cpp:
2984         (WebCore::TextTrackCueList::add):
2985
2986 2012-11-06  Aaron Colwell  <acolwell@chromium.org>
2987
2988         Regression(r132681): Heap-use-after-free in WebCore::RenderTextTrackCue::layout
2989         https://bugs.webkit.org/show_bug.cgi?id=100981
2990
2991         Reviewed by Eric Carlson.
2992
2993         Fixing a TextTrackCue use after free bug. textTrackRemoveCues() needs to be called when
2994         an HTMLTrackElement is removed from an HTMLMediaElement so that references to
2995         TextTrackCues are removed from m_cueTree.
2996
2997         Test: media/track/track-remove-by-setting-innerHTML.html
2998
2999         * html/HTMLMediaElement.cpp:
3000         (WebCore::HTMLMediaElement::willRemoveTrack):
3001
3002 2012-10-23  Stephen White  <senorblanco@chromium.org>
3003
3004         [skia] Implement reference (url) filters on composited layers.
3005         https://bugs.webkit.org/show_bug.cgi?id=100142
3006
3007         Reviewed by James Robinson.
3008
3009         Covered by css3/filters/effect-reference-hw.html
3010
3011         * WebCore.gyp/WebCore.gyp:
3012         * WebCore.gypi:
3013         Add new files.
3014         * WebCore.xcodeproj/project.pbxproj:
3015         Mark FilterEffect.h as "private".
3016         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3017         (WebCore::GraphicsLayerChromium::setFilters):
3018         Use the new SkImageFilter builder and setLayer() infrastructure, but
3019         only if there's a reference filter in the chain.
3020         * platform/graphics/filters/FEBlend.h:
3021         * platform/graphics/filters/FEColorMatrix.h:
3022         * platform/graphics/filters/FEGaussianBlur.h:
3023         * platform/graphics/filters/FELighting.h:
3024         * platform/graphics/filters/FEMorphology.h:
3025         * platform/graphics/filters/FilterEffect.h:
3026         (WebCore::FilterEffect::createImageFilter):
3027         Add createImageFilter() factory function for building SkImageFilters.
3028         * platform/graphics/filters/FilterOperation.h:
3029         (WebCore::FilterOperation::ReferenceFilterOperation::filterEffect):
3030         (WebCore::FilterOperation::ReferenceFilterOperation::setFilterEffect):
3031         Add a FilterEffect member to ReferenceFilterOperation, and accessors
3032         for it.
3033         * platform/graphics/filters/skia/FEBlendSkia.cpp:
3034         (WebCore::FEBlend::createImageFilter):
3035         Implement SkImageFilter building for FEBlend filter.
3036         * platform/graphics/filters/skia/FEColorMatrixSkia.cpp:
3037         (WebCore::createColorFilter):
3038         (WebCore::FEColorMatrix::platformApplySkia):
3039         Refactor creation of SkColorFilter from an FEColorMatrix filter.
3040         (WebCore::FEColorMatrix::createImageFilter):
3041         Implement SkImageFilter building for FEColorMatrix filter.
3042         * platform/graphics/filters/skia/FEGaussianBlurSkia.cpp:
3043         (WebCore::FEGaussianBlur::createImageFilter):
3044         Implement SkImageFilter building for FEGaussianBlur filter.
3045         * platform/graphics/filters/skia/FELightingSkia.cpp:
3046         (WebCore::FELighting::createImageFilter):
3047         Implement SkImageFilter building for FELighting filters.
3048         * platform/graphics/filters/skia/FEMorphologySkia.cpp:
3049         (WebCore::FEMorphology::createImageFilter):
3050         Implement SkImageFilter building for FEMorphology filter.
3051         * platform/graphics/filters/skia/SkiaImageFilterBuilder.cpp: Added.
3052         (WebCore::SkiaImageFilterBuilder::SkiaImageFilterBuilder):
3053         (WebCore::SkiaImageFilterBuilder::build):
3054         * platform/graphics/filters/skia/SkiaImageFilterBuilder.h:
3055         Implement new helper class for building an SkImageFilter DAG from
3056         a FilterEffect DAG.  Can also build from FilterOperations list.
3057         * rendering/FilterEffectRenderer.cpp:
3058         (WebCore::FilterEffectRenderer::build):
3059         When building FilterEffects from a reference filter, also store the
3060         generated DAG on the ReferenceFilterOperation itself.
3061         * rendering/RenderLayer.cpp:
3062         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
3063         Even when in composited mode, if there's a reference filter in the 
3064         chain, build the FilterEffect DAG from it.
3065
3066 2012-11-06  Max Feil  <mfeil@rim.com>
3067
3068         [BlackBerry] Automatically go fullscreen on video play
3069         https://bugs.webkit.org/show_bug.cgi?id=101100
3070
3071         Reviewed by Eric Carlson.
3072
3073         There is a requirement to have HTML5 video automatically enter
3074         fullscreen when a video starts playing (PR131774). This change
3075         implements this feature, with restrictions. The main restriction
3076         is adherence to WebKit's philosophy of only entering fullscreen
3077         due to a user gesture. This is important in order to avoid
3078         pop-up advertisements and other unwanted fullscreen content.
3079         One consequence of this is that video elements with the autoplay
3080         attribute will not automatically enter fullscreen.
3081
3082         Other caveats:
3083         - This feature applies only to "small screen" devices where
3084         automatically going fullscreen makes more sense.
3085         - Fullscreen will only be entered automatically when the
3086         video is played from the beginning (current time is zero).
3087         It is assumed that if the user is resuming play from a paused
3088         state and is not in fullscreen mode, then they exited fullscreen
3089         mode intentionally.
3090
3091         Test: platform/blackberry/media/video-automatic-fullscreen.html
3092
3093         * html/HTMLMediaElement.cpp:
3094         (WebCore::HTMLMediaElement::mediaPlayerEnterFullscreen):
3095         (WebCore):
3096         (WebCore::HTMLMediaElement::mediaPlayerIsFullscreen):
3097         (WebCore::HTMLMediaElement::mediaPlayerIsFullscreenPermitted):
3098         * html/HTMLMediaElement.h:
3099         (HTMLMediaElement):
3100         * platform/graphics/MediaPlayer.h:
3101         (WebCore::MediaPlayerClient::mediaPlayerEnterFullscreen):
3102         (WebCore::MediaPlayerClient::mediaPlayerIsFullscreen):
3103         (WebCore::MediaPlayerClient::mediaPlayerIsFullscreenPermitted):
3104         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
3105         (WebCore::MediaPlayerPrivate::play):
3106         (WebCore::MediaPlayerPrivate::waitMetadataTimerFired):
3107         (WebCore::MediaPlayerPrivate::conditionallyGoFullscreenAfterPlay):
3108         (WebCore):
3109         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
3110         (MediaPlayerPrivate):
3111
3112 2012-11-06  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3113
3114         [WK2][EFL][GTK] early return of checkSpellingOfString treats correct words as misspelled
3115         https://bugs.webkit.org/show_bug.cgi?id=101215
3116
3117         Reviewed by Gustavo Noronha Silva.
3118
3119         Save the misspelled location and length of the string to the default values (-1, 0)
3120         at the beginning of the checkSpellingOfString method.
3121         It assumes that the words are spelled correctly and early return of method doesn't
3122         cause assertions in findFirstMisspelling (WebCore/editing/TextCheckingHelper.cpp).
3123
3124         * platform/text/enchant/TextCheckerEnchant.cpp:
3125         (TextCheckerEnchant::checkSpellingOfString):
3126
3127 2012-11-06  Huang Dongsung  <luxtella@company100.net>
3128
3129         [TexMap] Remove unused textures in the texture pool.
3130         https://bugs.webkit.org/show_bug.cgi?id=100706
3131
3132         Reviewed by Noam Rosenthal.
3133
3134         Currently, we do not remove textures in the texture pool of
3135         TextureMapper. The texture pool is destroyed when TextureMapper is
3136         destroyed. It means the texture pool consumes texture memory until its
3137         destruction. This patch removes textures if the textures have been not
3138         used in 3 seconds as LayerTreeCoordinator manages UpdateAtlases.
3139
3140         Changing cache policy is not testable in layout tests.
3141
3142         * platform/graphics/texmap/TextureMapper.cpp:
3143         (WebCore::BitmapTexturePoolEntry::BitmapTexturePoolEntry):
3144         (WebCore::BitmapTexturePoolEntry::markUsed):
3145         (WebCore::BitmapTexturePoolEntry::compareTimeLastUsed):
3146         (BitmapTexturePoolEntry):
3147         (WebCore):
3148         (BitmapTexturePool):
3149         (WebCore::BitmapTexturePool::BitmapTexturePool):
3150         (WebCore::BitmapTexturePool::scheduleReleaseUnusedTextures):
3151         (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
3152         (WebCore::BitmapTexturePool::acquireTexture):
3153         (WebCore::TextureMapper::acquireTextureFromPool):
3154         (WebCore::TextureMapper::TextureMapper):
3155         (WebCore::TextureMapper::~TextureMapper):
3156         * platform/graphics/texmap/TextureMapper.h:
3157         (WebCore):
3158         (TextureMapper):
3159
3160 2012-11-02  Ilya Tikhonovsky  <loislo@chromium.org>
3161
3162         Web Inspector: NMI instrument CachedMetadata. It uses ~300k on plus.google.com
3163         https://bugs.webkit.org/show_bug.cgi?id=101067
3164
3165         Reviewed by Yury Semikhatsky.
3166
3167         Plain vanilla instrumentation for CachedMetadata class.
3168
3169         * CMakeLists.txt:
3170         * GNUmakefile.list.am:
3171         * Target.pri:
3172         * WebCore.gypi:
3173         * WebCore.vcproj/WebCore.vcproj:
3174         * WebCore.xcodeproj/project.pbxproj:
3175         * loader/CachedMetadata.cpp: Added.
3176         (WebCore):
3177         (WebCore::CachedMetadata::reportMemoryUsage):
3178         * loader/CachedMetadata.h:
3179         (CachedMetadata):
3180
3181 2012-11-06  Alexei Filippov  <alph@chromium.org>
3182
3183         Web Inspector: report physical memory really committed for JS heap in NMI
3184         https://bugs.webkit.org/show_bug.cgi?id=101335
3185
3186         Some OSes (e.g. Linux) perform lazy commits of requested memory.
3187         Because of that the committed memory may not retain any physical
3188         memory until the very first access to the committed chunk.
3189         That led to JS heap reported more physical memory than was currently
3190         in use.
3191
3192         Reviewed by Vsevolod Vlasov.
3193
3194         * bindings/v8/ScriptGCEvent.cpp:
3195         (WebCore::ScriptGCEvent::getHeapSize):
3196
3197 2012-11-06  Vsevolod Vlasov  <vsevik@chromium.org>
3198
3199         Web Inspector: Breakpoint is not removed when it was set in non-formatted mode and then removed while in formatted mode.
3200         https://bugs.webkit.org/show_bug.cgi?id=100595
3201
3202         Reviewed by Yury Semikhatsky.
3203
3204         Breakpoints in storage are now updated/removed by file name saved from primary location when they were created,
3205         not by the name returned by UISourceCode (as this one could change when UISourceCode is formatted).
3206         SourceFileId is now used across BreakpointManager to specify file name.
3207         And breakpointStorageId is now used to specify (fileName, lineNumber) pair.
3208
3209         * inspector/front-end/BreakpointManager.js:
3210         (WebInspector.BreakpointManager.sourceFileId):
3211         (WebInspector.BreakpointManager.prototype._restoreBreakpoints):
3212         (WebInspector.BreakpointManager.prototype._uiSourceCodeRemoved): Removed redundant check.
3213         (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
3214         (WebInspector.BreakpointManager.Breakpoint):
3215         (WebInspector.BreakpointManager.Breakpoint.prototype._breakpointStorageId):
3216         (WebInspector.BreakpointManager.Storage.prototype._restoreBreakpoints):
3217         (set WebInspector.BreakpointManager.Storage.Item):
3218
3219 2012-11-06  Keishi Hattori  <keishi@webkit.org>
3220
3221         The "Rect" class in WebCore/Resources/pagepopups/pickerCommon.js should be renamed
3222         https://bugs.webkit.org/show_bug.cgi?id=101304
3223
3224         Reviewed by Kent Tamura.
3225
3226         The name Rect conflicts with CSS Rect.
3227
3228         No new tests. Just renaming.
3229
3230         * Resources/pagepopups/pickerCommon.js:
3231         (Rectangle): Renamed from Rect.
3232         (Rectangle.prototype.toString):
3233         (Rectangle.intersection):
3234         (adjustWindowRect):
3235         (hideWindow):
3236
3237 2012-11-06  Kentaro Hara  <haraken@chromium.org>
3238
3239         Replace setDOMWrapper(wrapper, 0) with resetDOMWrapper(wrapper)
3240         https://bugs.webkit.org/show_bug.cgi?id=101190
3241
3242         Reviewed by Adam Barth.
3243
3244         To guarantee that we never stores NULL pointers to V8 internal
3245         fields, we want to insert ASSERT()s to setDOMWrapper().
3246         This patch replaces setDOMWrapper() that intentionally
3247         passes NULL pointers with clearDOMWrapper().
3248
3249         No tests. No change in behavior.
3250
3251         * bindings/v8/V8DOMWrapper.h:
3252         (V8DOMWrapper):
3253         (WebCore::V8DOMWrapper::clearDOMWrapper):
3254         * bindings/v8/V8NPObject.cpp:
3255         (WebCore::forgetV8ObjectForNPObject):
3256
3257 2012-11-06  Vsevolod Vlasov  <vsevik@chromium.org>
3258
3259         Web Inspector: Displayed name/path of urls in network tab of dev tools is inconsistent
3260         https://bugs.webkit.org/show_bug.cgi?id=101064
3261
3262         Reviewed by Yury Semikhatsky.
3263
3264         Extracted some generic methods from ParsedURL displayName getters (about:blank and data url handlers).
3265         Implemented consistent name() and path() method on NetworkRequest based on ParsedURL.
3266         NetworkPanel now uses name() and path() methods on NetworkRequest to show requests and search for them.
3267
3268         Test: http/tests/inspector/network/request-name-path.html
3269
3270         * inspector/front-end/NetworkPanel.js:
3271         (WebInspector.NetworkLogView.prototype._matchRequest):
3272         (WebInspector.NetworkLogView.prototype._highlightMatchedRequests):
3273         (WebInspector.NetworkLogView.prototype.performFilter):
3274         (WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
3275         (WebInspector.NetworkDataGridNode.NameComparator):
3276         * inspector/front-end/NetworkRequest.js:
3277         (WebInspector.NetworkRequest.prototype.set url):
3278         (WebInspector.NetworkRequest.prototype.name):
3279         (WebInspector.NetworkRequest.prototype.path):
3280         (WebInspector.NetworkRequest.prototype._parseNameAndPathFromURL):
3281         * inspector/front-end/ParsedURL.js:
3282         (WebInspector.ParsedURL):
3283         (WebInspector.ParsedURL.prototype.get displayName):
3284         (WebInspector.ParsedURL.prototype.dataURLDisplayName):
3285         (WebInspector.ParsedURL.prototype.isAboutBlank):
3286         (WebInspector.ParsedURL.prototype.isDataURL):
3287
3288 2012-11-05  Pavel Feldman  <pfeldman@chromium.org>
3289
3290         Web Inspector: make Spectrum and Popover WebInspector.Views in order to enable reuse
3291         https://bugs.webkit.org/show_bug.cgi?id=101200
3292
3293         Reviewed by Yury Semikhatsky.
3294
3295         - Split Spectrum and SpectrumPopoverHelper (first is a component, second is controller)
3296         - Made Popover a root view in order to enable lazy style loading for potential subviews (such as Spectrum)
3297         - Extracted spectrum's css into a separate file
3298
3299         * WebCore.gypi:
3300         * WebCore.vcproj/WebCore.vcproj:
3301         * inspector/front-end/DOMExtension.js:
3302         (Element.prototype.positionAt):
3303         (Size):
3304         (Element.prototype.measurePreferredSize):
3305         * inspector/front-end/HeapSnapshotView.js:
3306         (WebInspector.HeapSnapshotView.prototype.willHide):
3307         (WebInspector.HeapSnapshotView.prototype._helpClicked):
3308         * inspector/front-end/Popover.js:
3309         (WebInspector.Popover):
3310         (WebInspector.Popover.prototype.show):
3311         (WebInspector.Popover.prototype.showView):
3312         (WebInspector.Popover.prototype._innerShow):
3313         (WebInspector.Popover.prototype.hide):
3314         (WebInspector.Popover.prototype.dispose):
3315         (WebInspector.Popover.prototype._positionElement):
3316         * inspector/front-end/Spectrum.js:
3317         (WebInspector.Spectrum.alphaDrag):
3318         (WebInspector.Spectrum):
3319         (WebInspector.Spectrum.prototype.wasShown):
3320         (WebInspector.SpectrumPopupHelper):
3321         (WebInspector.SpectrumPopupHelper.prototype.spectrum):
3322         (WebInspector.SpectrumPopupHelper.prototype.toggle):
3323         (WebInspector.SpectrumPopupHelper.prototype.show):
3324         (WebInspector.SpectrumPopupHelper.prototype.reposition):
3325         (WebInspector.SpectrumPopupHelper.prototype.hide):
3326         (WebInspector.ColorSwatch):
3327         (WebInspector.ColorSwatch.prototype.setColorString):
3328         * inspector/front-end/StylesSidebarPane.js:
3329         (WebInspector.StylesSidebarPane):
3330         (WebInspector.StylesSidebarPane.prototype.update):
3331         (WebInspector.StylesSidebarPane.prototype.willHide):
3332         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
3333         * inspector/front-end/View.js:
3334         (WebInspector.View.prototype.measurePreferredSize):
3335         * inspector/front-end/WebKit.qrc:
3336         * inspector/front-end/elementsPanel.css:
3337         (.image-preview-container img):
3338         * inspector/front-end/inspector.css:
3339         (.swatch):
3340         (.swatch-inner):
3341         (.swatch-inner:hover):
3342         * inspector/front-end/spectrum.css: Added.
3343         (.spectrum-container):
3344         (.spectrum-top):
3345         (.spectrum-color):
3346         (.spectrum-display-value):
3347         (.spectrum-hue):
3348         (.spectrum-fill):
3349         (.spectrum-range-container):
3350         (.spectrum-range-container *):
3351         (.spectrum-range-container label):
3352         (.spectrum-range-container input):
3353         (.spectrum-dragger, .spectrum-slider):
3354         (.spectrum-sat):
3355         (.spectrum-val):
3356         (.spectrum-dragger):
3357         (.spectrum-slider):
3358         (.spectrum-container .swatch):
3359
3360 2012-11-06  Takashi Sakamoto  <tasak@google.com>
3361
3362         removeAttribute('style') not working in certain circumstances
3363         https://bugs.webkit.org/show_bug.cgi?id=99295
3364
3365         Reviewed by Ryosuke Niwa.
3366
3367         After web developers did style.XXXX=YYYY for some element, the inline
3368         style should be always removable by using "removeAttribute('style')".
3369         Currently it depends on whether web developers invokes
3370         getAttribute('style'), setAttribute('style), and so on. E.g. once they
3371         invoke getAttribute('style'), removeAttribute('style') works. This is
3372         very confusing behavior.
3373         Looking at Firefox browser, removeAttribute('style') always removes
3374         all inline styles.
3375
3376         Test: fast/css/remove-attribute-style.html
3377
3378         * css/StylePropertySet.cpp:
3379         (WebCore::StylePropertySet::clear):
3380         Added a new method to remove all style properties.
3381         (WebCore):
3382         * css/StylePropertySet.h:
3383         (StylePropertySet):
3384         * dom/Element.cpp:
3385         (WebCore::Element::removeAttribute):
3386         If 'style' is given but the element has no style attribute, the old
3387         code did nothing. However, if the element is styled element and has any
3388         inline styles, the inline styles should be removed. So invoke
3389         StyledElement::removeAllInlineStyleProperties and if any inline styles
3390         are removed, invoke style recalc, too.
3391         * dom/StyledElement.cpp:
3392         (WebCore::StyledElement::removeAllInlineStyleProperties):
3393         Added a new method to remove all inline style propeties. If any inline
3394         style is removed, invoke inlineStyleChanged() to force style recalc.
3395         (WebCore):
3396         * dom/StyledElement.h:
3397         (StyledElement):
3398
3399 2012-11-06  Alexei Filippov  <alph@chromium.org>
3400
3401         Web Inspector: dim size bar for expanded item in native memory snapshot grid
3402         https://bugs.webkit.org/show_bug.cgi?id=101062
3403
3404         Reviewed by Yury Semikhatsky.
3405
3406         * inspector/front-end/nativeMemoryProfiler.css:
3407         (.native-snapshot-view .data-grid .expanded div.size-bar):
3408
3409 2012-11-06  Shinya Kawanaka  <shinyak@chromium.org>
3410
3411         [Shadow] Using isUnknownPseudoElement() for shadow pseudo id seems confusing
3412         https://bugs.webkit.org/show_bug.cgi?id=100826
3413
3414         Reviewed by Hajime Morita.
3415
3416         We used isUnknownPseudoElement() for these 3 meanings: 1) the element is a custom pseudo-element (starting with 'x-'),
3417         2) the element is a webkit custom pseudo-element (starting with '-webkit-'), and 3) the element has an unknown type.
3418         We would like to distinguish them when parsing CSSSelector types. Also, we disable using (3) type for using
3419         shadowPseudoId.
3420
3421         In this patch, we allow using WebKitCustomPseudoElement in AuthorShadowRoot, and CustomPseudoElement in
3422         UAShadowRoot. However, we will disable them later.
3423
3424         Test: fast/dom/shadow/shadow-pseudo-id.html
3425
3426         * css/CSSGrammar.y.in: Now we can discard UNKNOWN type. It should not match anything.
3427         * css/CSSParser.cpp:
3428         (WebCore::CSSParser::updateSpecifiersWithElementName):
3429         (WebCore::CSSParser::updateSpecifiers):
3430         * css/CSSParserValues.h:
3431         (WebCore::CSSParserSelector::isCustomPseudoElement):
3432         (CSSParserSelector):
3433         * css/CSSSelector.cpp:
3434         (WebCore::CSSSelector::pseudoId):
3435         (WebCore::CSSSelector::parsePseudoType):
3436         (WebCore::CSSSelector::isCustomPseudoType): Returns true if the type is PseudoUserAgentCustomElement or PseudoWebKitCustomElement.
3437         (WebCore::CSSSelector::extractPseudoType):
3438         * css/CSSSelector.h:
3439         (CSSSelector):
3440         (WebCore::CSSSelector::isCustomPseudoElement):
3441         (WebCore):
3442         * css/CSSSelectorList.cpp:
3443         (WebCore::SelectorHasInvalidSelectorFunctor::operator()): We will reject all selectors which were judged as
3444         UNKNOWN before. i.e. It contians all three types for now.
3445         (WebCore::CSSSelectorList::hasInvalidSelector): Renamed.
3446         * css/CSSSelectorList.h:
3447        &nb