Implemented new API for RTCStatsReport object.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-08  Harald Alvestrand  <hta@chromium.org>
2
3         Implemented new API for RTCStatsReport object.
4         https://bugs.webkit.org/show_bug.cgi?id=110333
5
6         Removed RTCStatsElement object, moved its interface to
7         RTCStatsReport. Preserved some interfaces for
8         backwards compatibility; will be removed in a later patch.
9
10         Reviewed by Adam Barth.
11
12         Tested by extensions to RTCPeerConnection-stats test.
13
14         * Modules/mediastream/RTCStatsElement.cpp: Removed.
15         * Modules/mediastream/RTCStatsElement.h: Removed.
16         * Modules/mediastream/RTCStatsElement.idl: Removed.
17         * Modules/mediastream/RTCStatsReport.cpp:
18         (WebCore::RTCStatsReport::create):
19         (WebCore::RTCStatsReport::RTCStatsReport):
20         (WebCore):
21         (WebCore::RTCStatsReport::names):
22         (WebCore::RTCStatsReport::local):
23         (WebCore::RTCStatsReport::remote):
24         (WebCore::RTCStatsReport::addStatistic):
25         (WebCore::RTCStatsReport::addElement):
26         * Modules/mediastream/RTCStatsReport.h:
27         (RTCStatsReport):
28         (WebCore::RTCStatsReport::timestamp):
29         (WebCore::RTCStatsReport::id):
30         (WebCore::RTCStatsReport::stat):
31         * Modules/mediastream/RTCStatsReport.idl:
32         * Modules/mediastream/RTCStatsResponse.cpp:
33         (WebCore::RTCStatsResponse::namedItem):
34         (WebCore):
35         (WebCore::RTCStatsResponse::addReport):
36         (WebCore::RTCStatsResponse::addStatistic):
37         * Modules/mediastream/RTCStatsResponse.h:
38         (RTCStatsResponse):
39         * Modules/mediastream/RTCStatsResponse.idl:
40         * WebCore.gypi:
41         * platform/chromium/support/WebRTCStatsResponse.cpp:
42         (WebKit::WebRTCStatsResponse::addReport):
43         (WebKit):
44         (WebKit::WebRTCStatsResponse::addStatistic):
45         (WebKit::WebRTCStatsResponse::addElement):
46         * platform/mediastream/RTCStatsResponseBase.h:
47         (RTCStatsResponseBase):
48
49 2013-03-08  Eric Seidel  <eric@webkit.org>
50
51         Free up background parser's checkpoints when speculation succeeds
52         https://bugs.webkit.org/show_bug.cgi?id=110547
53
54         Reviewed by Adam Barth.
55
56         This should be a memory (and possible perf) win while parsing
57         pages, as we will no longer hold multiple copies of every
58         source byte during the whole parse.
59
60         Many LayoutTests exercise this code path, and I've manually (debugger and printf)
61         that we're hitting this code, but we'll have to wait for the memory/perf bots
62         to tell us if this shows up as a win.
63
64         We only bother to message the parser at the end of a speculation chain, so as not
65         to send too many messages to the background parser.
66
67         * html/parser/BackgroundHTMLInputStream.cpp:
68         (WebCore::BackgroundHTMLInputStream::BackgroundHTMLInputStream):
69         (WebCore::BackgroundHTMLInputStream::invalidateCheckpointsUpThrough):
70         (WebCore):
71         (WebCore::BackgroundHTMLInputStream::rewindTo):
72         * html/parser/BackgroundHTMLInputStream.h:
73         (BackgroundHTMLInputStream):
74         (Checkpoint):
75         (WebCore::BackgroundHTMLInputStream::Checkpoint::isNull):
76         (WebCore::BackgroundHTMLInputStream::Checkpoint::clear):
77         * html/parser/BackgroundHTMLParser.cpp:
78         (WebCore::BackgroundHTMLParser::passedCheckpoint):
79         (WebCore):
80         * html/parser/BackgroundHTMLParser.h:
81         (BackgroundHTMLParser):
82         * html/parser/HTMLDocumentParser.cpp:
83         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
84
85 2013-03-08  Chandra Shekar Vallala  <brk376@motorola.com>
86
87         [chromium] Keydown event for 'shift+alt' returns win keycode instead of 'alt'
88         https://bugs.webkit.org/show_bug.cgi?id=111112
89
90         Reviewed by Tony Chang.
91
92         Return windows keycode of Alt incase of GDK_META_L, GDK_META_R. This matches
93         the firefox behaviour in linux platform.
94
95         Added Manual Test : ManualTests/shift-alt-key-event.html
96         Try press Shift then alt key. The test passes if the shiftKey, altKey values
97         of JSKeyEvent are true and keycode/which is 18.
98
99         * platform/chromium/KeyCodeConversionGtk.cpp:
100         (WebCore::windowsKeyCodeForKeyEvent):
101
102 2013-03-08  Mike West  <mkwst@chromium.org>
103
104         CSP: 'eval()' is blocked in report-only mode.
105         https://bugs.webkit.org/show_bug.cgi?id=111867
106
107         Reviewed by Adam Barth.
108
109         Setting a 'Content-Security-Policy-Report-Only' header should not have
110         any effect on what a page actually executes. Currently, however, setting
111         a 'script-src' directive that doesn't whitelist 'unsafe-eval' actually
112         blocks 'eval()' on the page. This patch fixes that by checking whether
113         we're in report-only mode before turning 'eval()' off inside the script
114         engine.
115
116         This leaves us in a weird state, however. We don't currently have any
117         mechanism of explaining to the VM that we just want to be notified of
118         'eval()' usage. I've filed http://wkbug.com/111869 to cover this
119         aspect.
120
121         Test: http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html
122
123         * page/ContentSecurityPolicy.cpp:
124         (WebCore::ContentSecurityPolicy::didReceiveHeader):
125             For each policy we parse, check that we're only turning off eval in
126             the VM when we're in enforce mode. If we're in report-only mode,
127             skip it.
128
129 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
130
131         REGRESSION (r143643): <button> should support ::first-line and ::first-letter
132         https://bugs.webkit.org/show_bug.cgi?id=111782
133
134         Reviewed by Ojan Vafai.
135
136         Test: fast/forms/button-first-line-first-letter.html
137
138         * rendering/RenderBlock.cpp:
139         (WebCore::RenderBlock::firstLineBlock):
140         (WebCore::findFirstLetterBlock):
141         Add isRenderButton to the first-line and first-letter checks that
142         don't allow ::first-* styles for flexbox.
143
144 2013-03-08  Geoffrey Garen  <ggaren@apple.com>
145
146         Removed an out-of-date comment from SharedTimer
147         https://bugs.webkit.org/show_bug.cgi?id=111875
148
149         Reviewed by Mark Hahnenberg.
150
151         Even if we surround each call to an ObjC interface with an autorelease
152         pool, it's still nice to have one at top-level entry points like
153         timers, to avoid turning a single mistake into a long-term leak.
154
155         * platform/ios/SharedTimerIOS.mm:
156         (WebCore::timerFired):
157         * platform/mac/SharedTimerMac.mm:
158         (WebCore::timerFired):
159
160 2013-03-08  Benjamin Poulain  <benjamin@webkit.org>
161
162         [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
163         https://bugs.webkit.org/show_bug.cgi?id=111297
164
165         Reviewed by Kenneth Rohde Christiansen.
166
167         The 'view-mode' Media Feature spec is implemented in WebCore but
168         there is no WebKit support for it on Mac.
169         Because of this, we always lie and report a windowed view mode.
170
171         This patch add a feature flag for the feature and disable it on
172         Mac so that we stop reporting incorrect default values.
173
174         * WebCore.exp.in:
175         * css/CSSValueKeywords.in:
176         * css/MediaFeatureNames.h:
177         (MediaFeatureNames):
178         * css/MediaQueryEvaluator.cpp:
179         * css/MediaQueryExp.cpp:
180         (WebCore::featureWithCSSValueID):
181         (WebCore::featureWithoutValue):
182         * page/Page.cpp:
183         (WebCore::Page::Page):
184         * page/Page.h:
185         (Page):
186
187 2013-03-08  Ryosuke Niwa  <rniwa@webkit.org>
188
189         After sending message, Mail changes formatting
190         https://bugs.webkit.org/show_bug.cgi?id=111360
191
192         Reviewed by Enrica Casucci.
193
194         Added makeInsertedContentRoundTrippableWithHTMLTreeBuilder to move prohibited children (e.g. p, h1, etc...)
195         out of paragraph elements to run immediately after the fragment insertion. This function splits trees and
196         moves prohibited children out of paragraph elements to keep the tree isomorphic under HTML serialization and
197         parsing. Unfortunately, there are many other DOM tree constructs we need to fix to make the subtree truly
198         isomorphic but this is a step forward.
199
200         Test: editing/pasteboard/pasting-into-p-should-not-nest-p.html
201
202         * editing/ReplaceSelectionCommand.cpp:
203         (WebCore::isProhibitedParagraphChild): Added. Matches the list at
204         https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibited-paragraph-child
205         except main element, which is currently missing in the specification.
206         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): Added.
207         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Added.
208         (WebCore::ReplaceSelectionCommand::doApply): Call moveProhibitedChildrenOutOfParagraphElements.
209
210         * editing/ReplaceSelectionCommand.h:
211         (ReplaceSelectionCommand):
212
213 2013-03-08  Eric Seidel  <eric@webkit.org>
214
215         AtomicHTMLToken should not be heap allocated or RefCounted
216         https://bugs.webkit.org/show_bug.cgi?id=111250
217
218         Reviewed by Adam Barth.
219
220         It was clearly an oversight on our part to ever make AtomicHTMLToken ref-counted.
221         We don't need the actual "token" saved, just enough of it to recreate a fake token.
222
223         This removed many more mallocs than I thought it would, for a nice little speed win.
224         Before:
225         median= 450.482999993 ms, stdev= 7.2381436538 ms, min= 436.084999994 ms, max= 464.968999964 ms
226         After:
227         median= 436.41600004 ms, stdev= 5.71435647554 ms, min= 427.160999971 ms, max= 446.753000026 ms
228
229         * html/parser/AtomicHTMLToken.h:
230         (AtomicHTMLToken):
231         * html/parser/HTMLConstructionSite.cpp:
232         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
233         * html/parser/HTMLDocumentParser.cpp:
234         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
235         (WebCore::HTMLDocumentParser::constructTreeFromCompactHTMLToken):
236         * html/parser/HTMLElementStack.cpp:
237         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
238         * html/parser/HTMLFormattingElementList.cpp:
239         (WebCore):
240         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
241         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
242         * html/parser/HTMLStackItem.h:
243         (WebCore::HTMLStackItem::create):
244         (WebCore::HTMLStackItem::localName):
245         (WebCore::HTMLStackItem::attributes):
246         (WebCore::HTMLStackItem::getAttributeItem):
247         (HTMLStackItem):
248         (WebCore::HTMLStackItem::hasLocalName):
249         (WebCore::HTMLStackItem::hasTagName):
250         (WebCore::HTMLStackItem::HTMLStackItem):
251         * html/parser/HTMLTreeBuilder.cpp:
252         (WebCore::HTMLTreeBuilder::processFakeStartTag):
253         (WebCore::HTMLTreeBuilder::processFakeEndTag):
254         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
255         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
256         (WebCore::HTMLTreeBuilder::processStartTag):
257         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
258         (WebCore::HTMLTreeBuilder::processEndTag):
259         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
260         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
261         (WebCore::HTMLTreeBuilder::defaultForInHead):
262         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
263         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
264         * html/parser/TextDocumentParser.cpp:
265         (WebCore::TextDocumentParser::insertFakePreElement):
266
267 2013-03-08  Roger Fong  <roger_fong@apple.com>
268
269         Makefile fixes.
270
271         * WebCore.vcxproj/WebCore.make:
272
273 2013-03-07  Emil A Eklund  <eae@chromium.org>
274
275         [sub-pixel] Rounding error in table cell height calculation causes unnecessary scrollbar
276         https://bugs.webkit.org/show_bug.cgi?id=111794
277
278         Reviewed by Levi Weintraub.
279         
280         In RenderTableCell::logicalHeightForRowSizing the
281         adjustedLogicalHeight is calculated from the logicalHeight and
282         intrinsic padding and is then returned and floored. This can
283         cause cause the cell to be slightly smaller (0.5px) than the
284         element it contains.
285
286         Test: fast/sub-pixel/table-cell-height.html
287
288         * rendering/RenderTableCell.h:
289         (WebCore::RenderTableCell::logicalHeightForRowSizing):
290         Change to use pixelSnapped version of logicalHeight method and
291         change signature to return int as the only caller immediately
292         down-casts the result to an int.
293
294 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
295
296         RenderFullScreen needs to clear override sizes when exiting full screen
297         https://bugs.webkit.org/show_bug.cgi?id=111775
298
299         Reviewed by Ojan Vafai.
300
301         Test: fullscreen/full-screen-with-flex-item.html
302
303         * rendering/RenderFullScreen.cpp:
304         (RenderFullScreen::unwrapRenderer):
305         RenderFullScreen is a flexbox, so it will potentially set override
306         sizes on its children while in fullscreen mode. When we exit
307         fullscreen mode, we need to clear this override size, otherwise the
308         the leftover override size may affect layout. See the testcase for an
309         example.
310
311 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
312
313         [CSS Grid Layout] Handle 2 positions with one 'auto' properly
314         https://bugs.webkit.org/show_bug.cgi?id=111653
315
316         Reviewed by Tony Chang.
317
318         The rendering code was making the assumption that we have one position.
319         Thus it couldn't fully match what the specification wants as the 2 opposite
320         positions are required to resolve either position in several cases (e.g.
321         1 / span 2, auto / 'c').
322
323         This change introduces resolveGridPositionsFromStyle to do both opposite
324         positions resolution in one pass and thus handling more cases.
325
326         Test: fast/css-grid-layout/grid-item-spanning-resolution.html
327
328         * rendering/RenderGrid.cpp:
329         (WebCore::RenderGrid::maximumIndexInDirection):
330         (WebCore::RenderGrid::placeItemsOnGrid):
331         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
332         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
333         Updated the above functions to rely on resolveGridPositionsFromStyle.
334
335         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
336         Added this new function that handle the correct resolution.
337
338         (WebCore::RenderGrid::resolveGridPositionFromStyle):
339         Updated the ASSERT to match the new code flow.
340
341         * rendering/RenderGrid.h:
342         (WebCore::RenderGrid::GridSpan::GridSpan):
343         Introduced this new struct to hold the 2 positions along one axis.
344
345 2013-03-08  Dominic Cooney  <dominicc@chromium.org>
346
347         RenderTextControlSingleLine should not assume that its text element has a renderer
348         https://bugs.webkit.org/show_bug.cgi?id=111826
349
350         Reviewed by Ojan Vafai.
351
352         Tests: fast/forms/search/search-autoscroll-hidden-decoration-container-crash.html
353                fast/forms/search/search-hide-decoration-container-crash.html
354                fast/forms/search/search-scroll-hidden-decoration-container-crash.html
355
356         * rendering/RenderTextControlSingleLine.cpp:
357         (WebCore::RenderTextControlSingleLine::layout):
358         (WebCore::RenderTextControlSingleLine::controlClipRect):
359         (WebCore::RenderTextControlSingleLine::autoscroll):
360         (WebCore::RenderTextControlSingleLine::scroll):
361
362 2013-03-08  Joshua Bell  <jsbell@chromium.org>
363
364         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
365         https://bugs.webkit.org/show_bug.cgi?id=111459
366
367         Reviewed by Adam Barth.
368
369         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
370         origin is opened, the backing store instance must be re-used). This was a map to raw
371         pointers so that the backing store can be collected when all database references are
372         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
373         would add/remove itself on creation/destruction.
374
375         Replace this with a HashMap<WeakPtr<T>>. This simplifies the plumbing; map entries
376         "leak" but are purged on subsequent opens.
377
378         Added webkit_unit_test (Chromium port) to verify refcounts.
379
380         * Modules/indexeddb/IDBBackingStore.cpp:
381         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
382         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
383         (WebCore::IDBBackingStore::open): Ditto.
384         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
385         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
386         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
387         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
388         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
389         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
390         * Modules/indexeddb/IDBFactoryBackendImpl.h:
391         (IDBFactoryBackendImpl): Remove plumbing methods.
392
393 2013-03-08  John Mellor  <johnme@chromium.org>
394
395         @media queries do not take zooming into account
396         https://bugs.webkit.org/show_bug.cgi?id=53186
397
398         Reviewed by Kenneth Rohde Christiansen.
399
400         Fixes @media width and height to take into account full page zoom, by
401         adding code to MediaQueryEvaluator's width/heightMediaFeatureEval,
402         corresponding to the existing code in Element::clientWidth which makes
403         document.documentElement.clientWidth take into account page zoom.
404
405         Test: fast/media/mq-width-pagezoom.html
406
407         * css/MediaQueryEvaluator.cpp:
408         (WebCore::heightMediaFeatureEval):
409         (WebCore::widthMediaFeatureEval):
410
411 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
412
413         [BlackBerry] Add stubs for DNSResolveQueue platform specific methods
414         https://bugs.webkit.org/show_bug.cgi?id=111841
415
416         Reviewed by Rob Buis.
417
418         Add empty implementations of
419         DNSResolveQueue::platformProxyIsEnabledInSystemPreferences() and
420         DNSResolveQueue::platformResolve() to DNSBlackBerry.cpp to make it
421         build.
422
423         * platform/network/blackberry/DNSBlackBerry.cpp:
424         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
425         (WebCore::DNSResolveQueue::platformResolve):
426
427 2013-03-08  Glenn Hartmann  <hartmanng@chromium.org>
428
429        Adding a hook to collect data for a Google UMA histogram to track when
430        m_needsCompositedScrolling is turned on and off.
431        https://bugs.webkit.org/show_bug.cgi?id=111725
432
433        Reviewed by Julien Chaffraix.
434
435        We want to keep track of this information to quantify the effects of a
436        few patches that will cause us to opt in to composited scrolling.
437        Specifically, we want to measure the effects of
438        https://bugs.webkit.org/show_bug.cgi?id=109302,
439        https://bugs.webkit.org/show_bug.cgi?id=109966,
440        https://bugs.webkit.org/show_bug.cgi?id=109591, and
441        https://bugs.webkit.org/show_bug.cgi?id=107618.
442
443        We do this by measuring a per-layer boolean value, and comparing the
444        ratio between number of layers opted in and number of layers that remain
445        uncomposited. We hope the relative number of layers opting in will
446        increase after the relevant patches land and are enabled.
447
448        Unfortunately implementing extra statistics is impractical at the
449        moment since most of the actionable relevant data is expensive to
450        compute. For example, it would be useful to know if the layers that opt
451        out do so because of invisible or non-overlapping layers that cause a
452        potential stacking container's children to be discontiguous, because we
453        would potentially be able to mitigate the problem. However, this would
454        add considerable overhead to perform overlap testing just to gather
455        data.
456
457        No new tests (no change in behaviour).
458
459        * rendering/RenderLayer.cpp:
460        (WebCore::RenderLayer::updateNeedsCompositedScrolling):
461
462 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
463
464         [BlackBerry] GraphicsContext: rename addRoundedRectClip to clipRoundedRect
465         https://bugs.webkit.org/show_bug.cgi?id=111852
466
467         Reviewed by Rob Buis.
468
469         This changed in r139353.
470
471         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
472         (WebCore::GraphicsContext::clipRoundedRect):
473
474 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
475
476         [BlackBerry] Add BlendMode parameter to GraphicsContext::setPlatformCompositeOperation
477         https://bugs.webkit.org/show_bug.cgi?id=111840
478
479         Reviewed by Rob Buis.
480
481         This parameter was added in r137011.
482
483         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
484         (WebCore::GraphicsContext::setPlatformCompositeOperation):
485
486 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
487
488         [BlackBerry] Remove unused GraphicsContext::addInnerRoundedRectClip()
489         https://bugs.webkit.org/show_bug.cgi?id=111838
490
491         Reviewed by Rob Buis.
492
493         This was removed in r139138.
494
495         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
496
497 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
498
499         [BlackBerry] GraphicsContext: add fillRule parameter to clip() and canvasClip()
500         https://bugs.webkit.org/show_bug.cgi?id=111836
501
502         Reviewed by Rob Buis.
503
504         This parameter was added in r139967.
505
506         * platform/graphics/blackberry/PathBlackBerry.cpp:
507         (WebCore):
508         (WebCore::GraphicsContext::clip):
509         (WebCore::GraphicsContext::canvasClip):
510
511 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
512
513         Web Inspector: Get rid of file system ids and use file pathes as uri for file based uiSourceCodes.
514         https://bugs.webkit.org/show_bug.cgi?id=111753
515
516         Reviewed by Pavel Feldman.
517
518         * inspector/front-end/FileSystemMapping.js:
519         (WebInspector.FileSystemMappingImpl):
520         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings.get this):
521         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings):
522         (WebInspector.FileSystemMappingImpl.prototype._saveToSettings):
523         (WebInspector.FileSystemMappingImpl.prototype.set addFileSystemMapping):
524         (WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
525         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPaths):
526         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix):
527         * inspector/front-end/FileSystemProjectDelegate.js:
528         (WebInspector.FileSystemProjectDelegate.projectId):
529         (WebInspector.FileSystemProjectDelegate.prototype.id):
530         (WebInspector.FileSystemProjectDelegate.prototype.fileSystemPath):
531         (WebInspector.FileSystemWorkspaceProvider):
532         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
533         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
534         (WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
535         * inspector/front-end/IsolatedFileSystemManager.js:
536         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
537         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
538         * inspector/front-end/Workspace.js:
539         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
540
541 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
542
543         Web Inspector: Polish TabbedEditorContaner and ScriptsNavigator behavior.
544         https://bugs.webkit.org/show_bug.cgi?id=111732
545
546         Reviewed by Pavel Feldman.
547
548         Resources matching inspectedPageURL are always expanded in NavigatorView now.
549         Snippets tab in scripts navigator is not automatically opened anymore.
550         Cleared saved TabbedEditorContainer history because it might have been corrupted due to errors in earlier versions.
551         Snippets are not revealed in TabbedEditorContainer anymore unless they were actually selected by user or there is no other tabs opened.
552
553         * inspector/front-end/NavigatorView.js:
554         (WebInspector.NavigatorView):
555         (WebInspector.NavigatorView.prototype.addUISourceCode):
556         (WebInspector.NavigatorView.prototype._inspectedURLChanged):
557         (WebInspector.NavigatorView.prototype.revealUISourceCode):
558         (WebInspector.NavigatorView.prototype.removeUISourceCode):
559         (WebInspector.NavigatorFolderTreeElement.prototype.onattach):
560         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.uiSourceCode):
561         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.reveal):
562         * inspector/front-end/ScriptsNavigator.js:
563         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
564         * inspector/front-end/ScriptsPanel.js:
565         (WebInspector.ScriptsPanel.prototype._showFile):
566         * inspector/front-end/Settings.js:
567         (WebInspector.VersionController.prototype._updateVersionFrom1To2):
568         * inspector/front-end/TabbedEditorContainer.js:
569         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode.tabId.this._tabIds.get this):
570         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode):
571         (WebInspector.TabbedEditorContainer.History.prototype._rebuildItemIndex):
572
573 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
574
575         Web Inspector: Add shortcut for running a snippet.
576         https://bugs.webkit.org/show_bug.cgi?id=111680
577
578         Reviewed by Pavel Feldman.
579
580         Added Ctrl/Cmd+Enter as a shortcut for running a snippet.
581
582         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
583         (WebInspector.SnippetJavaScriptSourceFrame):
584         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
585         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runSnippet):
586         (WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown):
587
588 2013-03-08  Philip Rogers  <pdr@google.com>
589
590         Prevent infinite loop in SVG use cycle detection
591         https://bugs.webkit.org/show_bug.cgi?id=111822
592
593         Reviewed by Stephen Chenney.
594
595         SVG use cycle detection depended on idForStyleResolution() which differs from
596         getIdAttribute() in quirks mode. During use tree cycle detection, this difference
597         resulted in an infinite loop because idForStyleResolution() used lower-cased id
598         attributes. This patch removes an existing fixme for this and switches to using
599         getIdAttribute().
600
601         Test: svg/custom/use-cycle-detection.html
602
603         * svg/SVGUseElement.cpp:
604         (WebCore::SVGUseElement::hasCycleUseReferencing):
605
606 2013-03-08  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
607
608         When we set word-wrap: break-word and xml:space="preserve" to svg text element, the text is collapsed.
609         https://bugs.webkit.org/show_bug.cgi?id=111675
610
611         Reviewed by Stephen Chenney.
612
613         RenderSVGText define its size when it laid out its first line at SVGRootInlineBox::computePerCharacterLayoutInformation().
614
615         In the following spec, SVG don't perform automatic line break or word wrapping.
616         http://www.w3.org/TR/SVG/text.html#Introduction
617         > SVG performs no automatic line breaking or word wrapping.
618         However, when we set word-wrap: break-word and xml:space="preserve" to svg text element, RenderBlock::LineBreaker::nextLineBreak() breaks the text.
619         This make single character lines and make RenderSVGText narrow.
620
621         We must ignore word-wrap property to make the text a single line.
622
623         We always disable break words and break all in nextLineBreak() when the object is SVGInlineText.
624
625         Test: svg/text/preserve-break-word.html
626
627         * rendering/RenderBlockLineLayout.cpp:
628         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Disable break words and break all when we process SVG Text.
629
630 2013-03-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
631
632         [Qt] HTML5 video - sound volume bar out of widget
633         https://bugs.webkit.org/show_bug.cgi?id=108213
634
635         Reviewed by Jocelyn Turcotte.
636
637         Since we use Safari shadow DOM for media controls, follow
638         the overall layout of Safari media control CSS.
639
640         * css/mediaControlsQt.css:
641         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
642         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
643         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
644         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
645         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
646         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
647         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
648         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
649         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
650         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
651         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
652         (audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button):
653         (audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button):
654         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
655
656 2013-03-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
657
658         [Qt] Doesn't build with QtMultimedia
659         https://bugs.webkit.org/show_bug.cgi?id=111847
660
661         Reviewed by Jocelyn Turcotte.
662
663         Fix include.
664
665         * platform/graphics/qt/MediaPlayerPrivateQt.h:
666
667 2013-03-08  Huang Dongsung  <luxtella@company100.net>
668
669         [EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
670         https://bugs.webkit.org/show_bug.cgi?id=111829
671
672         Reviewed by Noam Rosenthal.
673
674         Currently, flagsChanged deals with all boolean flags. It introduces this bug
675         because when another flag (i.e. preserves3D) is changed, fixedToViewport is set
676         to false. So this patch updates all flags when at least one flag is changed.
677
678         In addition, this patch amends isScrollable code to match other flags.
679
680         This patch can only be tested manually since there is no automated
681         testing facilities for in-motion touch.
682         Test: ManualTests/fixed-position.html
683               ManualTests/nested-fixed-position.html
684
685         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
686         (WebCore::CoordinatedGraphicsLayer::setScrollableArea):
687         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
688         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
689         (WebCore::CoordinatedGraphicsScene::setLayerState):
690         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
691         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
692
693 2013-03-07  Dean Jackson  <dino@apple.com>
694
695         Remove dead label code in snapshotted plugin
696         https://bugs.webkit.org/show_bug.cgi?id=111781
697
698         Reviewed by Tim Horton.
699
700         Since ports can use the shadow tree to do label display,
701         there is no need for the hardcoded timers in RenderSnapshottedPlugin.
702
703         * rendering/RenderSnapshottedPlugIn.cpp: Remove label flags and timers.
704         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
705         (WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn):
706         (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
707         (WebCore::RenderSnapshottedPlugIn::handleEvent):
708         * rendering/RenderSnapshottedPlugIn.h:
709         (RenderSnapshottedPlugIn):
710
711 2013-03-07  Dean Jackson  <dino@apple.com>
712
713         Implement a custom appearance for the snapshotted plugin background
714         https://bugs.webkit.org/show_bug.cgi?id=108368
715
716         Reviewed by Tim Horton.
717
718         After https://bugs.webkit.org/show_bug.cgi?id=108284 (r142507), a
719         snapshotted plugin was no longer drawing the background of the
720         label blurred. Since the snapshot content was now a shadow tree,
721         it wasn't feasible to pre-blur a region of the snapshot: the label
722         could be any size and in any location, with ports being able to
723         override the appearance through their UA style sheet.
724
725         Instead we now use one of the elements in the tree, the snapshot-overlay,
726         as a hook where ports can add any effect they want. This could be simply
727         a border, or a transparent mask, or even a CSS filter. We introduce a custom
728         CSS appearance "snapshotted-plugin-overlay", which could be added to the
729         element in the injected UA stylesheet. This calls into RenderTheme in
730         the same way that custom controls do.
731
732         Meanwhile, in RenderThemeMac, we implement the appearance by drawing the
733         content of the plugin snapshot into the background of the element. That
734         way we can add effects in CSS.
735
736         Test: plugins/snapshot-appearance.html
737
738         * css/CSSPrimitiveValueMappings.h:
739         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Handle SnapshottedPluginOverlayPart.
740         * css/CSSValueKeywords.in: New appearance value snapshotted-plugin-overlay.
741         * platform/ThemeTypes.h: New value SnapshottedPluginOverlayPart.
742         * html/HTMLPlugInElement.h:
743         (WebCore::toHTMLPlugInElement): Add safer casting helpers.
744         * html/HTMLPlugInImageElement.h:
745         (WebCore::toHTMLPlugInImageElement): Ditto.
746         * rendering/RenderSnapshottedPlugIn.cpp: Remove the code for handling
747             the blur directly in the renderer.
748         (WebCore::RenderSnapshottedPlugIn::paint): Simplify the paint logic since we're
749             no longer trying to blur here.
750         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Ditto.
751         * rendering/RenderSnapshottedPlugIn.h: Remove the methods that were trying
752             to blur the image directly.
753         * rendering/RenderTheme.cpp:
754         (WebCore::RenderTheme::paint): Call paintSnapshottedPluginOverlay.
755         * rendering/RenderTheme.h:
756         (WebCore::RenderTheme::paintSnapshottedPluginOverlay): New virtual method with default implementation.
757         * rendering/RenderThemeMacShared.h:
758         (RenderThemeMacShared): Override paintSnapshottedPluginOverlay.
759         * rendering/RenderThemeMacShared.mm:
760         (WebCore::RenderThemeMacShared::paintSnapshottedPluginOverlay): Implement a custom render path
761             that takes the snapshot image from the node's parent, and draws it into the background.
762             Along the way make sure we're actually using the right type of element (an HTMLPlugInImageElement).
763
764 2013-03-08  Sergio Villar Senin  <svillar@igalia.com>
765
766         Improve drag&drop of list items in contentEditable divs
767         https://bugs.webkit.org/show_bug.cgi?id=111556
768
769         Reviewed by Ryosuke Niwa.
770
771         A single fully selected <li> should generate the same markup as if
772         we were selecting some of them, i.e., we should preserve the list
773         structure and appearance.
774
775         Test: editing/selection/drag-list-item.html
776
777         * editing/htmlediting.cpp:
778         (WebCore::isListItem): modified constness.
779         * editing/htmlediting.h:
780         (WebCore): ditto.
781         * editing/markup.cpp:
782         (WebCore::highestAncestorToWrapMarkup):
783
784 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
785
786         [BlackBerry] LayerTiler: rename currentFrameHasAlpha as currentFrameKnownToBeOpaque
787         https://bugs.webkit.org/show_bug.cgi?id=111828
788
789         Reviewed by Carlos Garcia Campos.
790
791         This changed in r141637.
792
793         * platform/graphics/blackberry/LayerTiler.cpp:
794         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
795
796 2013-03-08  Antoine Quint  <graouts@apple.com>
797
798         Fix a couple of typos.
799
800         Unreviewed.
801
802         * inspector/Inspector.json:
803
804 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
805
806         [BlackBerry] Use OwnPtr for CredentialBackingStore members
807         https://bugs.webkit.org/show_bug.cgi?id=111737
808
809         Reviewed by Rob Buis.
810
811         It simplifies the code a bit.
812
813         * platform/network/blackberry/CredentialBackingStore.cpp:
814         (WebCore::CredentialBackingStore::~CredentialBackingStore):
815         (WebCore::CredentialBackingStore::open):
816         (WebCore::CredentialBackingStore::certMgrWrapper):
817         * platform/network/blackberry/CredentialBackingStore.h:
818         (CredentialBackingStore):
819
820 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
821
822         MemoryPressureHandler should fully flush the WebCore & NS URL caches
823         https://bugs.webkit.org/show_bug.cgi?id=111827
824
825         Rubber Stamped by Geoff Garen
826
827         When the handler is fired we should free as much memory as possible.
828
829         * platform/mac/MemoryPressureHandlerMac.mm:
830         (WebCore::MemoryPressureHandler::releaseMemory):
831             - fully flush the WebCore & NS URL caches
832
833 2013-03-07  Keishi Hattori  <keishi@webkit.org>
834
835         Update calendar picker UI
836         https://bugs.webkit.org/show_bug.cgi?id=109439
837
838         Reviewed by Kent Tamura.
839
840         This patch changes the calendar picker UI.
841
842         Added tests to existing calendar picker tests.
843         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-month-popup.html
844
845         * Resources/pagepopups/calendarPicker.css:
846         (body):
847         (.rtl):
848         (.scroll-view):
849         (.scroll-view-content):
850         (.list-cell):
851         (.list-cell.hidden):
852         (.day-cell):
853         (.week-number-cell):
854         (.day-cell.today):
855         (.day-cell.highlighted):
856         (.day-cell.highlighted.disabled):
857         (.day-cell.selected):
858         (.day-cell.disabled):
859         (.day-cell.current-month):
860         (.calendar-table-view):
861         (.preparing .calendar-table-view:focus):
862         (.week-day-label):
863         (.week-number-label):
864         (.calendar-table-header-view):
865         (.calendar-picker):
866         (.calendar-header-view):
867         (.calendar-title):
868         (.rtl .calendar-title):
869         (.month-popup-button:disabled):
870         (.month-popup-button):
871         (.month-popup-button .disclosure-triangle):
872         (.month-popup-button .disclosure-triangle svg):
873         (.today-button::after):
874         (.calendar-navigation-button):
875         (.year-list-view):
876         (.year-list-cell):
877         (.year-list-cell .label):
878         (.year-list-cell .month-chooser):
879         (.month-buttons-row):
880         (.month-button):
881         (.month-button.highlighted):
882         (.scrubby-scroll-bar):
883         (.scrubby-scroll-thumb):
884         (.month-popup-view):
885         (.year-list-view .scrubby-scroll-bar):
886         (.rtl .year-list-view .scrubby-scroll-bar):
887         * Resources/pagepopups/calendarPicker.js:
888         (setGlobalParams): Sets the global params.
889         (initialize):
890         (openCalendarPicker):
891         (CalendarHeaderView.prototype.onNavigationButtonClick): Fix typo.
892         (CalendarPicker):
893         (CalendarPicker.prototype.onWindowResize): We want to have the "preparing" class applied
894         to cancel css transitions while setting up the calendar picker so we can avoid flaky pixel tests.
895         (CalendarPicker.prototype.onYearListViewDidHide): The user clicked on a month so hide the month popup.
896         (CalendarPicker.prototype.onYearListViewDidSelectMonth): Change the current month in response to the month popup.
897         (CalendarPicker.prototype.attachTo): We want the calendar table focused when the calendar picker first opens.
898         (CalendarPicker.prototype.cleanup): Clean up any event listeners or elements attached to nodes outside of this.element.
899         (CalendarPicker.prototype.onMonthPopupButtonClick): Open the month popup in response to the month popup button being clicked.
900         (CalendarPicker.prototype._setConfig): Configures the calendar picker.
901         (CalendarPicker.prototype.currentMonth): The currently shown month.
902         (CalendarPicker.prototype.setCurrentMonth): Scrolls the calendar table to the given month. Use the navigation behavior param to specify if you want a transition animation.
903         (CalendarPicker.prototype.adjustHeight): Adjusts the height so its just tall enough to fit the current month. If the month picker is open, fit that.
904         (CalendarPicker.prototype.selection): Currently selected date range.
905         (CalendarPicker.prototype.highlight): Currently highlighted date range.
906         (CalendarPicker.prototype.firstVisibleDay): Returns the first visible day ignoring scroll animation (i.e. this is the first visible day when the scroll animation is done).
907         (CalendarPicker.prototype.lastVisibleDay): Returns the last visible day ignoring scroll animation.
908         (CalendarPicker.prototype.selectRangeContainingDay): Sets the selection to the date range containing the given day.
909         (CalendarPicker.prototype.highlightRangeContainingDay): Sets the highlight to the date range containing the given day.
910         (CalendarPicker.prototype.setSelection): Sets the selection to the given date range.
911         (CalendarPicker.prototype._setHighlight): Sets the highlight to the given date range.
912         (CalendarPicker.prototype._stepMismatch): Just moving.
913         (CalendarPicker.prototype._outOfRange): Ditto.
914         (CalendarPicker.prototype.isValid): Returns true if the given date range is a valid selection.
915         (CalendarPicker.prototype.isValidDay): Returns true if the day is part of a valid selection.
916         (CalendarPicker.prototype._moveHighlight): Moves the highlight to the given date range if possible. Returns true if it succeeds.
917         (CalendarPicker.prototype.onCalendarTableKeyDown): Handles the arrow keys, etc.
918         (CalendarPicker.prototype.width):
919         (CalendarPicker.prototype.height):
920         (CalendarPicker.prototype.setHeight):
921         (CalendarPicker.prototype.onBodyKeyDown): Handles esc/m/y/d.
922         * Resources/pagepopups/chromium/calendarPickerChromium.css:
923         (.calendar-table-view:focus):
924         (.preparing .calendar-table-view:focus):
925
926 2013-03-07  Seokju Kwon  <seokju.kwon@gmail.com>
927
928         Web Inspector: Remove unused return value after r122962
929         https://bugs.webkit.org/show_bug.cgi?id=111821
930
931         Reviewed by Pavel Feldman.
932
933         No new tests.
934
935         * inspector/front-end/ConsolePanel.js:
936         (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
937         * inspector/front-end/ElementsPanel.js:
938         (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
939         * inspector/front-end/ScriptsPanel.js:
940         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
941
942 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
943
944         Unreviewed, rolling out r145166.
945         http://trac.webkit.org/changeset/145166
946         https://bugs.webkit.org/show_bug.cgi?id=111819
947
948         build break - no symbol
949         webkit_support::CreateScopedTempDirectory() (Requested by
950         hayato on #webkit).
951
952         * Modules/indexeddb/IDBBackingStore.cpp:
953         (WebCore::IDBBackingStore::IDBBackingStore):
954         (WebCore::IDBBackingStore::~IDBBackingStore):
955         (WebCore::IDBBackingStore::open):
956         * Modules/indexeddb/IDBBackingStore.h:
957         (WebCore):
958         (IDBBackingStore):
959         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
960         (WebCore::IDBFactoryBackendImpl::addIDBBackingStore):
961         (WebCore):
962         (WebCore::IDBFactoryBackendImpl::removeIDBBackingStore):
963         (WebCore::IDBFactoryBackendImpl::openBackingStore):
964         * Modules/indexeddb/IDBFactoryBackendImpl.h:
965         (IDBFactoryBackendImpl):
966
967 2013-03-07  Hajime Morrita  <morrita@google.com>
968
969         Custom Elements: CustomElement constructor shouldn't share function instance
970         https://bugs.webkit.org/show_bug.cgi?id=111807
971
972         Reviewed by Kentaro Hara.
973
974         Adaptor functions of custom elements unintentionally share the instance.
975         This fix gives new one for each.
976
977         Test: Updated fast/dom/custom/document-register-basic.html
978
979         * bindings/v8/V8AdaptorFunction.cpp:
980         (WebCore::V8AdaptorFunction::wrap):
981
982 2013-03-07  Jared Wyles  <wyles@adobe.com>
983
984         Reading border radius from style property returns in wrong order.
985         https://bugs.webkit.org/show_bug.cgi?id=110853
986
987         Reviewed by Ryosuke Niwa
988         
989         Updating the order of border-radius to return in the order specified
990         in http://www.w3.org/TR/css3-background/#the-border-radius
991
992         Tests updated in LayoutTests/fast/borders/border-radius-parsing.html 
993         Changed the expectations in LayoutTests/inspector/elements/elements-panel-styles-expected.txt 
994         
995         Compat information -
996         jQuery's css function favours using getComputedStyle for elements so that should not be impacted.
997         Zepto does check for the element on style first so may be a slight concern there.
998
999         * css/StylePropertyShorthand.cpp:
1000         (WebCore::borderRadiusShorthand):
1001
1002 2013-03-07  Andreas Kling  <akling@apple.com>
1003
1004         Resizing Cappuccino is very laggy on WebKit since Safari 5.1
1005         <http://webkit.org/b/71354>
1006         <rdar://problem/10565998>
1007
1008         Reviewed by Anders Carlsson.
1009
1010         * WebCore.exp.in: Export FloatPoint(const NSPoint&)
1011
1012 2013-03-07  Andreas Kling  <akling@apple.com>
1013
1014         Remove desktop version of -webkit-text-size-adjust property.
1015         <http://webkit.org/b/56543>
1016         <rdar://problem/9150203>
1017
1018         Reviewed by Simon Fraser.
1019
1020         This property existed to support a number of Apple-internal clients of WebKit.
1021         We no longer need this property, and since it's clashing with a mobile version of the
1022         same property with different meaning, let's remove it altogether from the desktop build.
1023
1024         * css/CSSComputedStyleDeclaration.cpp:
1025         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1026         * css/CSSParser.cpp:
1027         (WebCore::isValidKeywordPropertyAndValue):
1028         (WebCore::isKeywordPropertyID):
1029         (WebCore::CSSParser::parseValue):
1030         * css/CSSPrimitiveValue.cpp:
1031         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1032         * css/CSSProperty.cpp:
1033         (WebCore::CSSProperty::isInheritedProperty):
1034         * css/CSSPropertyNames.in:
1035         * css/StyleBuilder.cpp:
1036         (WebCore::ApplyPropertyLineHeight::applyValue):
1037         * css/StyleResolver.cpp:
1038         (WebCore::StyleResolver::updateFont):
1039         (WebCore::StyleResolver::applyProperties):
1040         (WebCore::StyleResolver::applyProperty):
1041         * css/StyleResolver.h:
1042         (StyleResolver):
1043         * css/svg.css:
1044         * editing/EditingStyle.cpp:
1045         * inspector/front-end/inspector.css:
1046         (#console-messages):
1047         * inspector/front-end/resourcesPanel.css:
1048         (.storage-view.query):
1049         * rendering/style/RenderStyle.cpp:
1050         (WebCore::RenderStyle::diff):
1051         * rendering/style/RenderStyle.h:
1052         * rendering/style/StyleRareInheritedData.cpp:
1053         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1054         (WebCore::StyleRareInheritedData::operator==):
1055         * rendering/style/StyleRareInheritedData.h:
1056         (StyleRareInheritedData):
1057
1058 2013-03-07  Joshua Bell  <jsbell@chromium.org>
1059
1060         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
1061         https://bugs.webkit.org/show_bug.cgi?id=111459
1062
1063         Reviewed by Adam Barth.
1064
1065         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
1066         origin is opened, the backing store instance must be re-used). This was a map to raw
1067         pointers so that the backing store can be collected when all database references are
1068         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
1069         would add/remove itself on creation/destruction.
1070
1071         Replace this with a HashMap<WeakPtr<>>. This simplifies the plumbing; map entries
1072         "leak" but are purged on subsequent opens.
1073
1074         Added webkit_unit_test (Chromium port) to verify refcounts.
1075
1076         * Modules/indexeddb/IDBBackingStore.cpp:
1077         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
1078         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
1079         (WebCore::IDBBackingStore::open): Ditto.
1080         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
1081         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
1082         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
1083         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
1084         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
1085         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
1086         * Modules/indexeddb/IDBFactoryBackendImpl.h:
1087         (IDBFactoryBackendImpl): Remove plumbing methods.
1088
1089 2013-03-07  Otto Derek Cheung  <otcheung@rim.com>
1090
1091         [BlackBerry] RefCounting ParsedCookie to avoid SegFaults
1092         https://bugs.webkit.org/show_bug.cgi?id=111761
1093
1094         Reviewed by Rob Buis.
1095
1096         Making necessary changes to ref count the ParsedCookie object.
1097
1098         Tested using the opera cookie test suite and the BB Browser cookie test suite.
1099         Tested using the browser, visiting popular sites such as facebook, reddit, google etc
1100         to ensure cookie functionality isn't changed.
1101
1102         * loader/blackberry/CookieJarBlackBerry.cpp:
1103         (WebCore::getRawCookies):
1104         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
1105         (WebCore::CookieDatabaseBackingStore::insert):
1106         (WebCore::CookieDatabaseBackingStore::update):
1107         (WebCore::CookieDatabaseBackingStore::remove):
1108         (WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase):
1109         (WebCore::CookieDatabaseBackingStore::invokeGetCookiesWithLimit):
1110         (WebCore::CookieDatabaseBackingStore::invokeSendChangesToDatabase):
1111         (WebCore::CookieDatabaseBackingStore::addToChangeQueue):
1112         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
1113         (CookieDatabaseBackingStore):
1114         * platform/blackberry/CookieManager.cpp:
1115         (WebCore::cookieSorter):
1116         (WebCore::CookieManager::setCookies):
1117         (WebCore::CookieManager::getCookie):
1118         (WebCore::CookieManager::generateHtmlFragmentForCookies):
1119         (WebCore::CookieManager::getRawCookies):
1120         (WebCore::CookieManager::checkAndTreatCookie):
1121         (WebCore::CookieManager::addCookieToMap):
1122         (WebCore::CookieManager::getBackingStoreCookies):
1123         (WebCore::CookieManager::findOrCreateCookieMap):
1124         (WebCore::CookieManager::removeCookieWithName):
1125         (WebCore::CookieManager::cookieLimitCleanUp):
1126         * platform/blackberry/CookieManager.h:
1127         * platform/blackberry/CookieMap.cpp:
1128         (WebCore::CookieMap::addOrReplaceCookie):
1129         (WebCore::CookieMap::removeCookieAtIndex):
1130         (WebCore::CookieMap::removeCookie):
1131         (WebCore::CookieMap::getAllCookies):
1132         (WebCore::CookieMap::removeOldestCookie):
1133         (WebCore::CookieMap::deleteAllCookiesAndDomains):
1134         (WebCore::CookieMap::getAllChildCookies):
1135         * platform/blackberry/CookieMap.h:
1136         (CookieMap):
1137         * platform/blackberry/CookieParser.cpp:
1138         (WebCore):
1139         (WebCore::CookieParser::parse):
1140         (WebCore::CookieParser::parseOneCookie):
1141         * platform/blackberry/CookieParser.h:
1142         (CookieParser):
1143         * platform/blackberry/ParsedCookie.cpp:
1144         * platform/blackberry/ParsedCookie.h:
1145         (ParsedCookie):
1146         (WebCore::ParsedCookie::create):
1147
1148 2013-03-07  Aaron Colwell  <acolwell@chromium.org>
1149
1150         Heap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
1151         https://bugs.webkit.org/show_bug.cgi?id=110623
1152
1153         Reviewed by Kentaro Hara.
1154
1155         Test: http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html
1156
1157         * bindings/v8/V8GCController.cpp: Fix MinorGCWrapperVisitor so it doesn't collect ActiveDOMObjects
1158                                           that have pending activity.
1159         * html/HTMLAudioElement.h:
1160         (HTMLAudioElement): Removed hasPendingActivity() now that this is handled by the base class.
1161         * html/HTMLAudioElement.idl: Removed ActiveDOMObject annotation since HTMLMediaElement now has it.
1162         * html/HTMLMediaElement.cpp:
1163         (WebCore::HTMLMediaElement::hasPendingActivity): Update implementation to return true if the media
1164                                                          has audio and is playing. This brings the code into
1165                                                          compliance with the detached element behavior outlined
1166                                                          in the HTML5 spec.
1167         * html/HTMLMediaElement.idl: Added ActiveDOMObject annotation so that all derived classes are
1168                                      considered ActiveDOMObjects.
1169
1170 2013-03-07  Jeffrey Pfau  <jpfau@apple.com>
1171
1172         CFNetwork cache partitioning does not work properly on subdomains
1173         https://bugs.webkit.org/show_bug.cgi?id=111772
1174
1175         Reviewed by David Kilzer.
1176
1177         Ensure that the cache partitioning is done over the top privately-controlled domain for the NSURLRequest.
1178
1179         Not possible to test with current automated test tools, must be tested manually.
1180
1181         * loader/cache/MemoryCache.cpp: Remove extraneous calls to partitionName
1182         (WebCore):
1183         (WebCore::MemoryCache::add):
1184         (WebCore::MemoryCache::revalidationSucceeded):
1185         (WebCore::MemoryCache::resourceForRequest):
1186         (WebCore::MemoryCache::evict):
1187         (WebCore::MemoryCache::removeResourcesWithOrigin):
1188         * platform/network/cf/ResourceRequest.h: Put top privately-controlled domain reduction code into ResourceRequest::partitionName
1189         (ResourceRequest):
1190         (WebCore::ResourceRequest::cachePartition):
1191         (WebCore::ResourceRequest::setCachePartition): Pre-process the partition name
1192         * platform/network/cf/ResourceRequestCFNet.cpp:
1193         (WebCore):
1194         (WebCore::ResourceRequest::partitionName):
1195         * platform/network/mac/ResourceRequestMac.mm:
1196         (WebCore::ResourceRequest::doUpdatePlatformRequest): Use a UTF-8 version of the cache partition name
1197
1198 2013-03-07  Kenneth Russell  <kbr@google.com>
1199
1200         Compute WebGL context attributes from DrawingBuffer when it is used
1201         https://bugs.webkit.org/show_bug.cgi?id=111666
1202
1203         Reviewed by James Robinson.
1204
1205         Fixed computation of antialias flag when DrawingBuffer is used.
1206
1207         No new tests; covered by existing tests. Ran WebGL conformance
1208         tests on desktop Linux and Android to test.
1209
1210         * html/canvas/WebGLRenderingContext.cpp:
1211         (WebCore):
1212         (WebCore::WebGLRenderingContext::getContextAttributes):
1213             Query DrawingBuffer, when used, for antialias flag.
1214
1215 2013-03-07  Beth Dakin  <bdakin@apple.com>
1216
1217         Need API to draw custom overhang area
1218         https://bugs.webkit.org/show_bug.cgi?id=111679
1219         -and corresponding-
1220         <rdar://problem/13291415>
1221
1222         Reviewed by Simon Fraser.
1223
1224         This will allow clients to put custom images into the top or bottom overhang area.
1225
1226         New FrameView API takes a bool indicating whether the client wants a top/bottom 
1227         overhang layer. If the bool is true, the overhang layer will be returned. 
1228         * WebCore.exp.in:
1229         * page/FrameView.cpp:
1230         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
1231         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
1232         * page/FrameView.h:
1233         (FrameView):
1234
1235         Keep member variables for the top and bottom overhang layers. Create them if 
1236         necessary, and update them if the root layer changes.
1237         * rendering/RenderLayerCompositor.cpp:
1238         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1239         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
1240         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
1241         (WebCore::RenderLayerCompositor::reportMemoryUsage):
1242         * rendering/RenderLayerCompositor.h:
1243         (RenderLayerCompositor):
1244
1245 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
1246
1247         Reduce page cache size on Mac
1248         https://bugs.webkit.org/show_bug.cgi?id=111795
1249
1250         Rubber stamped by Geoff Garen
1251
1252         5 entries is unnecessarily large; research show 3 should suffice.
1253         On a low memory warning we should clear this completely.
1254
1255         * platform/mac/MemoryPressureHandlerMac.mm:
1256         (WebCore::MemoryPressureHandler::releaseMemory):
1257             - clear the page cache completely
1258
1259 2013-03-07  Simon Fraser  <simon.fraser@apple.com>
1260
1261         Rename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer
1262         https://bugs.webkit.org/show_bug.cgi?id=111779
1263
1264         Reviewed by Tim Horton.
1265         
1266         "TileCache" was a name conflict in downstream code, so rename it to TileController.
1267         The layer that has a TileController is now a WebTiledBackingLayer (which fits with
1268         the TiledBacking API that TileController exposes).
1269         
1270         Also renamed the flags in PlatformCALayer to match.
1271
1272         Rename only, no behavior change.
1273
1274         * WebCore.xcodeproj/project.pbxproj:
1275         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1276         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
1277         * platform/graphics/GraphicsLayerClient.h:
1278         (WebCore::GraphicsLayerClient::shouldUseTiledBacking):
1279         * platform/graphics/ca/GraphicsLayerCA.cpp:
1280         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1281         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1282         (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
1283         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
1284         (WebCore::GraphicsLayerCA::updateVisibleRect):
1285         (WebCore::GraphicsLayerCA::getDebugBorderInfo):
1286         (WebCore::GraphicsLayerCA::requiresTiledLayer):
1287         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1288         * platform/graphics/ca/GraphicsLayerCA.h:
1289         * platform/graphics/ca/PlatformCALayer.h:
1290         (WebCore::PlatformCALayer::usesTiledBackingLayer):
1291         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1292         (PlatformCALayer::PlatformCALayer):
1293         (PlatformCALayer::~PlatformCALayer):
1294         (PlatformCALayer::tiledBacking):
1295         * platform/graphics/ca/mac/TileController.h: Renamed from Source/WebCore/platform/graphics/ca/mac/TileCache.h.
1296         * platform/graphics/ca/mac/WebTileLayer.h:
1297         (TileController):
1298         * platform/graphics/ca/mac/WebTileLayer.mm:
1299         (-[WebTileLayer drawInContext:]):
1300         (-[WebTileLayer setTileController:WebCore::]):
1301         (-[WebTileLayer logFilledFreshTile]):
1302         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.h.
1303         * platform/graphics/ca/mac/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.mm.
1304         * platform/graphics/mac/WebLayer.mm:
1305         (drawLayerContents):
1306         * rendering/RenderLayerBacking.cpp:
1307         (WebCore::RenderLayerBacking::RenderLayerBacking):
1308         (WebCore::RenderLayerBacking::shouldUseTiledBacking):
1309         (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
1310         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1311         * rendering/RenderLayerBacking.h:
1312         (WebCore::RenderLayerBacking::usingTiledBacking):
1313         (RenderLayerBacking):
1314         (WebCore::RenderLayerBacking::hasTiledBackingFlatteningLayer):
1315         * rendering/RenderLayerCompositor.cpp:
1316         (WebCore::RenderLayerCompositor::frameViewDidLayout):
1317         (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
1318         (WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):
1319
1320 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
1321
1322         FormData should allow setting filename to empty
1323         https://bugs.webkit.org/show_bug.cgi?id=111687
1324
1325         Reviewed by Brady Eidson.
1326
1327         Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
1328                http/tests/local/formdata/send-form-data-with-empty-file-filename.html
1329
1330         * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
1331         Missing value is a null string. If the string is empty, we should treat is as
1332         authoritative.
1333
1334 2013-03-07  David Hyatt  <hyatt@apple.com>
1335
1336         REGRESSION: fast/border/border-fit-2.html needs updating
1337         https://bugs.webkit.org/show_bug.cgi?id=111776
1338
1339         Reviewed by Simon Fraser.
1340
1341         This test is incorrectly shrinking the border image now.
1342         We need to apply some clamping to the border-fit like the
1343         old code did. The pixel results *are* still changing though,
1344         since a layout-time shrinkage will not result in right-aligned
1345         boxes in an LTR block when the left edge gets chopped. We'll
1346         have to see if this behavioral change ends up being a problem,
1347         but for now we'll rebaseline and assume it will be ok.
1348
1349         * rendering/RenderBlock.cpp:
1350         (WebCore::RenderBlock::fitBorderToLinesIfNeeded):
1351
1352 2013-03-07  Antoine Quint  <graouts@apple.com>
1353
1354         Web Inspector: provide reasons why a layer was composited in the LayerTreeAgent
1355         https://bugs.webkit.org/show_bug.cgi?id=111703
1356
1357         Introduce a new LayerTree.reasonsForCompositingLayer(layerId) method which returns
1358         the list of reasons why the provided layer was composited as an object with an
1359         optional property for each possible reason. The RenderLayerCompositor already knows
1360         how to provide this information via its own reasonsForCompositing() method, and we
1361         process the returned bitmask to populate the object sent to the front-end.
1362
1363         Reviewed by Timothy Hatcher.
1364
1365         Test: inspector-protocol/layers/layers-compositing-reasons.html
1366
1367         * inspector/Inspector.json:
1368         * inspector/InspectorLayerTreeAgent.cpp:
1369         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
1370         (WebCore):
1371         * inspector/InspectorLayerTreeAgent.h:
1372         (InspectorLayerTreeAgent):
1373
1374 2013-03-07  Anders Carlsson  <andersca@apple.com>
1375
1376         Add a didFocusTextField callback to the injected bundle form client
1377         https://bugs.webkit.org/show_bug.cgi?id=111771
1378
1379         Reviewed by Andreas Kling.
1380
1381         Export a symbol needed by WebKit2.
1382
1383         * WebCore.exp.in:
1384
1385 2013-03-06  James Robinson  <jamesr@chromium.org>
1386
1387         [chromium] Stop using WebTransformationMatrix on WebLayer
1388         https://bugs.webkit.org/show_bug.cgi?id=111635
1389
1390         Reviewed by Adrienne Walker.
1391
1392         Switches over to the SkMatrix44 transform setters.
1393
1394         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1395         (WebCore::transformToSkMatrix44):
1396           Utility for convering a WebCore::TransformationMatrix to an SkMatrix44.
1397           Will move to a more common location once it gets more callers.
1398         (WebCore::GraphicsLayerChromium::updateTransform):
1399         (WebCore::GraphicsLayerChromium::updateChildrenTransform):
1400
1401 2013-03-07  Eric Carlson  <eric.carlson@apple.com>
1402
1403         [Mac] allow iOS to use CaptionUserPreferencesMac
1404         https://bugs.webkit.org/show_bug.cgi?id=111770
1405
1406         Reviewed by Dean Jackson.
1407
1408         No new tests, covered by existing tests.
1409
1410         * page/CaptionUserPreferencesMac.h:
1411         * page/CaptionUserPreferencesMac.mm:
1412         (WebCore::userCaptionPreferencesChangedNotificationCallback): Respond to notifications on
1413             the web thread.
1414
1415 2013-03-07  Mike West  <mkwst@chromium.org>
1416
1417         Move side-effects on hover/active state out of hit-testing
1418         https://bugs.webkit.org/show_bug.cgi?id=98168
1419
1420         Reviewed by Julien Chaffraix.
1421
1422         Original patch by Allan Sandfeld Jensen; I'm just tweaking things.
1423
1424         Document::updateHoverActiveState is currently called during hit testing
1425         to update the hover and active states of elements effected by mouse
1426         movements (or their keyboard equivalents). This conflates the hit test
1427         algorithm itself with side-effects associated with specific use-cases.
1428
1429         This conflation makes it very difficult to reuse the hover/active logic
1430         for things other than hit testing. 'mouseenter'/'mouseleave' events[1]
1431         are one example of a feature that would be simple to implement on top of
1432         this existing logic if we split it out from the hit testing path, and
1433         instead call it explicitly when necessary. An explicit split between
1434         hit testing and its side-effects will also enable us to simplify the
1435         logic in future patches with well-named parameters, rather than relying
1436         on stuffing properties into HitTestRequest.
1437
1438         This patch drops the call to Document::updateHoverActiveState from
1439         RenderView::hitTest, and adjusts the three call-sites in EventHandler
1440         to explicitly call out to it rather than Document::updateStyleIfNeeded.
1441         The latter call is still necessary but has been folded into
1442         updateHoverActiveState, as the former is never called without calling
1443         the latter.
1444
1445         [1]: http://wkbug.com/18930
1446
1447         * dom/Document.h:
1448         * dom/Document.cpp:
1449         (WebCore::Document::updateHoverActiveState):
1450             First, this function must now only be called from contexts that were
1451             performing a read/write hit-test: the code asserts this
1452             precondition.
1453
1454             Second, rather than accepting a HitTestResult, the function accepts
1455             an Element* from which to begin the hover/active chain changes.
1456
1457             Third, we have to explicitly update the hover/active states for
1458             documents between the updated element and the top-level document.
1459             The hit-testing logic was taking care of this for us, now we need to
1460             take care of it ourselves.
1461
1462             Fourth, call out to updateStyleIfNeeded rather than making our
1463             caller do so. The calls were always paired; now that's explicit.
1464         (WebCore::Document::prepareMouseEvent):
1465         * page/EventHandler.cpp:
1466         (WebCore::EventHandler::hitTestResultAtPoint):
1467         (WebCore::EventHandler::sendContextMenuEventForKey):
1468         (WebCore::EventHandler::hoverTimerFired):
1469             Call out to updateHoverActiveState rather than updateStyleIfNeeded.
1470         * rendering/RenderView.cpp:
1471         (WebCore::RenderView::hitTest):
1472             Drop the call to updateHoverActiveState.
1473
1474 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1475
1476         Unreviewed, rolling out r145097.
1477         http://trac.webkit.org/changeset/145097
1478         https://bugs.webkit.org/show_bug.cgi?id=111765
1479
1480         Triggers an ASSERT in the Chromium port (Requested by abarth
1481         on #webkit).
1482
1483         * html/FileInputType.cpp:
1484         (WebCore::FileInputType::appendFormData):
1485         * platform/network/FormData.cpp:
1486         (WebCore::FormData::appendKeyValuePairItems):
1487
1488 2013-03-07  Chris Fleizach  <cfleizach@apple.com>
1489
1490         AX: Can't activate links with VoiceOver in Safari
1491         https://bugs.webkit.org/show_bug.cgi?id=111755
1492
1493         Reviewed by Tim Horton.
1494
1495         VoiceOver is relying on the press action being the first action in the list. We changed
1496         that order inadvertently recently, which confuses VoiceOver.
1497
1498         Test: platform/mac/accessibility/press-action-is-first.html
1499
1500         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1501         (-[WebAccessibilityObjectWrapper accessibilityActionNames]):
1502
1503 2013-03-07  Rafael Weinstein  <rafaelw@chromium.org>
1504
1505         Unreviewed, rolling out r145083.
1506         http://trac.webkit.org/changeset/145083
1507         https://bugs.webkit.org/show_bug.cgi?id=110733
1508
1509         caused lots crashes in http/tests/security/xssAuditor/* tests
1510
1511         * html/parser/XSSAuditor.cpp:
1512         (WebCore::XSSAuditor::XSSAuditor):
1513         (WebCore::XSSAuditor::init):
1514         (WebCore::XSSAuditor::filterToken):
1515         * html/parser/XSSAuditor.h:
1516         * html/parser/XSSAuditorDelegate.cpp:
1517         (WebCore::XSSAuditorDelegate::didBlockScript):
1518         * html/parser/XSSAuditorDelegate.h:
1519         (WebCore::XSSInfo::create):
1520         (XSSInfo):
1521         (WebCore::XSSInfo::XSSInfo):
1522
1523 2013-03-07  Michelangelo De Simone  <michelangelo@webkit.org>
1524
1525         [CSS Shaders] Implement hue and saturation non-separable blend modes
1526         https://bugs.webkit.org/show_bug.cgi?id=109464
1527
1528         Added the following GLSL helper functions to the CustomFilterValidatedProgram:
1529
1530             - css_Sat(C): returns the saturation for the color C
1531             - css_SetSat(C, s): sets the saturation s on the color C
1532             - css_SetSatHelper(Cmin, Cmid, Cmax, s): helper function for css_SetSat
1533
1534         The above functions are being used for the "hue" and "saturation" non-separable
1535         blend modes, the relevant spec for such modes is at URL:
1536         https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blendingnonseparable
1537
1538         Reviewed by Dean Jackson.
1539
1540         Tests: css3/filters/custom/custom-filter-nonseparable-blend-mode-hue.html
1541                css3/filters/custom/custom-filter-nonseparable-blend-mode-saturation.html
1542
1543         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
1544         (WebCore::CustomFilterValidatedProgram::blendFunctionString):
1545
1546 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
1547
1548         Web Inspector: [ACE] set correct font
1549         https://bugs.webkit.org/show_bug.cgi?id=111747
1550
1551         Reviewed by Pavel Feldman.
1552
1553         No new tests.
1554
1555         Set class "source-code" for the ace editor element.
1556
1557         * inspector/front-end/AceTextEditor.js:
1558         (WebInspector.AceTextEditor):
1559
1560 2013-03-06  Ojan Vafai  <ojan@chromium.org>
1561
1562         Recalculate borders at the beginning of table layout
1563         https://bugs.webkit.org/show_bug.cgi?id=111634
1564
1565         Reviewed by Julien Chaffraix.
1566
1567         Doing it in convertStyleLogicalWidthToComputedWidth missed some dynamic
1568         relayout cases. I confirmed that the new results match the results we
1569         would get if we set the border width initially instead of dynamically.
1570
1571         * rendering/RenderTable.cpp:
1572         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
1573         (WebCore::RenderTable::layout):
1574
1575 2013-03-07  David Hyatt  <hyatt@apple.com>
1576
1577         border-fit-adjust should happen at layout time rather than paint time
1578         https://bugs.webkit.org/show_bug.cgi?id=111606
1579         <rdar://problem/13101714>
1580
1581         Reviewed by Antti Koivisto.
1582
1583         In order for border-fit-adjust to be accurate in more cases, it needs
1584         to be a layout-time adjustment rather than a paint-time adjustment.
1585         Specifically there are cases where an LTR adjusted box was right-aligned
1586         by its container, and without genuinely shrinking the size of the box,
1587         we end up chopping off the right edge but not shifting the box to the
1588         right to compensate.
1589         
1590         This patch changes border-fit-adjust to now do the adjustment using
1591         the override width mechanism and a second layout pass instead of just
1592         hacking painting.
1593
1594         Test: fast/block/border-fit-with-right-alignment.html
1595
1596         * rendering/RenderBlock.cpp:
1597         (WebCore::RenderBlock::layoutBlock):
1598         Calls fitBorderToLinesIfNeeded at the end of layout to do a second
1599         layout pass if the adjustment needs to be made.
1600
1601         (WebCore::RenderBlock::fitBorderToLinesIfNeeded):
1602         Renamed borderFitAdjust to fitBorderToLinesIfNeeded and made it
1603         non-virtual, since it's no longer called from RenderBox code. Changed it
1604         to do a relayout using override widths if an adjustment is needed.
1605
1606         * rendering/RenderBlock.h:
1607         (RenderBlock):
1608         Renamed borderFitAdjust to fitBorderToLinesIfNeeded and made it
1609         non-virtual.
1610
1611         * rendering/RenderBox.cpp:
1612         (WebCore::RenderBox::paintBoxDecorations):
1613         (WebCore::RenderBox::paintMask):
1614         Removed the paint-time border-fit adjustment.
1615
1616         (WebCore::RenderBox::computeLogicalWidthInRegion):
1617         Use the override width when border-fit is set to lines.
1618
1619         * rendering/RenderBox.h:
1620         (RenderBox):
1621         Remove the virtual borderFitAdjust method.
1622
1623 2013-03-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1624
1625         REGRESSION(r143727): Clicking / selecting inside an <embed> is broken
1626         https://bugs.webkit.org/show_bug.cgi?id=111217
1627
1628         Reviewed by Julien Chaffraix.
1629
1630         Hit-testing into child frames need to happen in RenderPart, otherwise
1631         we will miss frame views in <embed> and <object> elements. 
1632
1633         Test: fast/dom/nodesFromRect/nodesFromRect-embedded-frame-content.html
1634
1635         * rendering/RenderFrameBase.cpp:
1636         * rendering/RenderFrameBase.h:
1637         (RenderFrameBase):
1638         * rendering/RenderPart.cpp:
1639         (WebCore::RenderPart::nodeAtPoint):
1640         * rendering/RenderPart.h:
1641         (RenderPart):
1642
1643 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
1644
1645         FormData should allow setting filename to empty
1646         https://bugs.webkit.org/show_bug.cgi?id=111687
1647
1648         Reviewed by Brady Eidson.
1649
1650         Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
1651                http/tests/local/formdata/send-form-data-with-empty-file-filename.html
1652
1653         * html/FileInputType.cpp: (WebCore::FileInputType::appendFormData):
1654         Use a Blob for empty file input, not a hacky File with empty path.
1655
1656         * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
1657         Missing value is a null string. If the string is empty, we should treat is as
1658         authoritative.
1659
1660 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
1661
1662         Web Inspector: [CodeMirror] dublicated horizontal scroll
1663         https://bugs.webkit.org/show_bug.cgi?id=111712
1664
1665         Reviewed by Pavel Feldman.
1666
1667         Set a box-sizing css property on all codemirror elements to
1668         "content-box".
1669
1670         No new tests.
1671
1672         * inspector/front-end/cm/cmdevtools.css:
1673         (.CodeMirror *):
1674
1675 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
1676
1677         Web Inspector: Styles sidebar pane toolbar disappears in horizontal split mode.
1678         https://bugs.webkit.org/show_bug.cgi?id=111735
1679
1680         Reviewed by Pavel Feldman.
1681
1682         * inspector/front-end/ElementsPanel.js:
1683         (WebInspector.ElementsPanel.prototype._splitVertically):
1684         * inspector/front-end/elementsPanel.css:
1685         (.sidebar-pane.composite .metrics-and-computed .sidebar-pane-toolbar):
1686
1687 2013-03-07  Zan Dobersek  <zdobersek@igalia.com>
1688
1689         [GTK] Limit the supported compilers to GCC >= 4.7 and Clang >= 3.0
1690         https://bugs.webkit.org/show_bug.cgi?id=109932
1691
1692         Reviewed by Martin Robinson.
1693
1694         * GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags.
1695         They are now available by default due to the limited set of supported compilers.
1696         * bindings/gobject/GNUmakefile.am: Ditto.
1697
1698 2013-03-07  Mike West  <mkwst@chromium.org>
1699
1700         XSSAuditor should send only one console error when blocking a page.
1701         https://bugs.webkit.org/show_bug.cgi?id=110733
1702
1703         Reviewed by Daniel Bates.
1704
1705         Currently, we send two console errors when XSSAuditor blocks a page:
1706         "Refused to execute a JavaScript script. Source code of script found
1707         within request.\n", and "Entire page will be blocked.".
1708
1709         We should only send one message, tuning it properly for the context, and
1710         including the URL of the page effected by the XSSAuditor's work.
1711
1712         Covered by rebaselines of all the XSSAuditor and 'reflected-xss' tests.
1713
1714         * html/parser/XSSAuditor.cpp:
1715         * html/parser/XSSAuditor.h:
1716         (WebCore::XSSAuditor::XSSAuditor):
1717             Add two booleans to track the headers used to set the XSSAuditor state.
1718         (WebCore::XSSAuditor::init):
1719             Save a copy of the document's URL even if we're not generating a
1720             report upon violation: we'll need it for the console messages. Also
1721             populate the didSendValidXXXHeader booleans for use later.
1722         (WebCore::XSSAuditor::filterToken):
1723             Add detail about the header status to the constructed XSSInfo object.
1724         * html/parser/XSSAuditorDelegate.cpp:
1725         (WebCore::buildConsoleError):
1726             Move message construction out into a separate inlined function, as
1727             it's becoming complex.
1728         (WebCore::XSSAuditorDelegate::didBlockScript):
1729             Fold the "Entire page will be blocked" message into the main console
1730             error.
1731         * html/parser/XSSAuditorDelegate.h:
1732         (WebCore::XSSInfo::create):
1733         (WebCore::XSSInfo::XSSInfo):
1734             Add detail about header status to XSSInfo in order to correctly
1735             construct the console error.
1736
1737 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
1738
1739         Web Inspector: Add some more compilation annotations to NavigatorView
1740         https://bugs.webkit.org/show_bug.cgi?id=111730
1741
1742         Reviewed by Alexander Pavlov.
1743
1744         * inspector/front-end/NavigatorView.js:
1745
1746 2013-03-06  Gustavo Noronha Silva  <gns@gnome.org>
1747
1748         [GTK] Enable translations for WebKit2
1749         https://bugs.webkit.org/show_bug.cgi?id=111398
1750
1751         Reviewed by Martin Robinson.
1752
1753         Build change only, thus no tests.
1754
1755         * GNUmakefile.am: distribute po files.
1756         * platform/gtk/po/POTFILES.in: adjust paths for translatable files.
1757
1758 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
1759
1760         Web Inspector: [CodeMirror] update codemirror to version 3.1
1761         https://bugs.webkit.org/show_bug.cgi?id=111711
1762
1763         Reviewed by Vsevolod Vlasov.
1764
1765         Update code mirror experimental editor to version 3.1
1766
1767         No new tests.
1768
1769         * inspector/front-end/cm/codemirror.css:
1770         (.CodeMirror div.CodeMirror-cursor):
1771         (.CodeMirror div.CodeMirror-secondarycursor):
1772         (.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor):
1773         (.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor:not(#nonsense_id)):
1774         (.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite):
1775         (.CodeMirror-gutters):
1776         (.CodeMirror-linewidget):
1777         (.CodeMirror-widget):
1778         (.CodeMirror-focused div.CodeMirror-cursor):
1779         (@media print):
1780         * inspector/front-end/cm/codemirror.js:
1781         (window.CodeMirror):
1782         (window.CodeMirror.):
1783
1784 2013-03-07  Sergio Correia  <sergio.correia@openbossa.org>
1785
1786         OpenGLShims: fix check for ANGLE GLES2 extensions
1787         https://bugs.webkit.org/show_bug.cgi?id=111656
1788
1789         Reviewed by Simon Hausmann.
1790
1791         The check for ANGLE GLES2 extensions is currently being overriden
1792         with checks for APPLE extensions in lookupOpenGLFunctionAddress().
1793
1794         No new tests. No user visible behavior changed.
1795
1796         * platform/graphics/OpenGLShims.cpp:
1797         (WebCore::lookupOpenGLFunctionAddress):
1798
1799 2013-03-07  David Kilzer  <ddkilzer@apple.com>
1800
1801         Rename visible_units.h to VisibleUnits.h in WebCore.vcxproj.filters
1802         <http://webkit.org/b/111426>
1803
1804         * WebCore.vcxproj/WebCore.vcxproj.filters: Rename visible_units.h
1805         to VisibleUnits.h and re-sort.
1806
1807 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
1808
1809         Web Inspector: Support a shortcut for reloading front-end in debug mode.
1810         https://bugs.webkit.org/show_bug.cgi?id=111709
1811
1812         Reviewed by Pavel Feldman.
1813
1814         * inspector/front-end/buildSystemOnly.js:
1815         * inspector/front-end/inspector.js:
1816         (WebInspector.documentKeyDown):
1817
1818 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
1819
1820         Web Inspector: Support setting up file system mappings from scripts panel context menu.
1821         https://bugs.webkit.org/show_bug.cgi?id=111583
1822
1823         Reviewed by Pavel Feldman.
1824
1825         Added context menu items to set up network - file system mappings from sources panel.
1826         Implemented mapping add/remove methods on Workspace.
1827         Added a dialog suggesting to reload front-end after making such changes.
1828
1829         * English.lproj/localizedStrings.js:
1830         * inspector/front-end/FileSystemMapping.js:
1831         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPath):
1832         * inspector/front-end/FileSystemProjectDelegate.js:
1833         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
1834         (WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
1835         * inspector/front-end/FilteredItemSelectionDialog.js:
1836         (WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
1837         (WebInspector.FilteredItemSelectionDialog.prototype.setQuery):
1838         (WebInspector.SelectUISourceCodeDialog):
1839         (WebInspector.SelectUISourceCodeDialog.prototype.uiSourceCodeSelected):
1840         (WebInspector.SelectUISourceCodeDialog.prototype.filterProject):
1841         (WebInspector.SelectUISourceCodeDialog.prototype.filterUISourceCode):
1842         (WebInspector.SelectUISourceCodeDialog.prototype.selectItem):
1843         (WebInspector.SelectUISourceCodeDialog.prototype._uiSourceCodeAdded):
1844         (WebInspector.OpenResourceDialog):
1845         (WebInspector.OpenResourceDialog.prototype.uiSourceCodeSelected):
1846         (WebInspector.OpenResourceDialog.prototype.filterProject):
1847         (WebInspector.SelectUISourceCodeForProjectTypeDialog):
1848         (WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype.uiSourceCodeSelected):
1849         (WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype.filterProject):
1850         (WebInspector.SelectUISourceCodeForProjectTypeDialog.show):
1851         * inspector/front-end/ScriptsPanel.js:
1852         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork.mapFileSystemToNetwork):
1853         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork):
1854         (WebInspector.ScriptsPanel.prototype._removeNetworkMapping):
1855         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem.mapNetworkToFileSystem):
1856         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem):
1857         (WebInspector.ScriptsPanel.prototype.):
1858         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeMappingItems):
1859         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
1860         * inspector/front-end/SettingsScreen.js:
1861         (WebInspector.WorkspaceSettingsTab):
1862         (WebInspector.WorkspaceSettingsTab.prototype.wasShown):
1863         (WebInspector.WorkspaceSettingsTab.prototype._reset):
1864         * inspector/front-end/ViewportControl.js:
1865         (WebInspector.ViewportControl.prototype.refresh):
1866         * inspector/front-end/Workspace.js:
1867         (WebInspector.Workspace.prototype.addMapping):
1868         (WebInspector.Workspace.prototype.removeMapping):
1869         * inspector/front-end/externs.js:
1870         (WebInspector.suggestReload):
1871         * inspector/front-end/inspector.js:
1872         (WebInspector.suggestReload):
1873
1874 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
1875
1876         Web Inspector: Add support for frontend reloading
1877         https://bugs.webkit.org/show_bug.cgi?id=111727
1878
1879         Reviewed by Pavel Feldman.
1880
1881         This patch adds support for frontend reloading including:
1882           - making sure no messages are sent to backend once frontend started reloading
1883           - updating frontend url with up-to-date dockSide query parameter value.
1884
1885         * inspector/front-end/InspectorBackend.js:
1886         (InspectorBackendClass.prototype.sendMessageObjectToBackend):
1887         (InspectorBackendClass.prototype.disconnect):
1888         * inspector/front-end/externs.js:
1889         (WebInspector.reload):
1890         * inspector/front-end/inspector.js:
1891         (WebInspector.reload):
1892
1893 2013-03-07  Alexei Filippov  <alph@chromium.org>
1894
1895         Web Inspector: Change profile start button caption depending on profile type.
1896         https://bugs.webkit.org/show_bug.cgi?id=111698
1897
1898         Change the start profiling button caption to "Snapshot" for
1899         snapshot-like profile types, e.g. JS heap snapshot, native memory snapshot.
1900
1901         Reviewed by Yury Semikhatsky.
1902
1903         * English.lproj/localizedStrings.js:
1904         * inspector/front-end/HeapSnapshotView.js:
1905         (WebInspector.HeapSnapshotProfileType.prototype.isInstantProfile):
1906         * inspector/front-end/NativeMemorySnapshotView.js:
1907         (WebInspector.NativeSnapshotProfileType.prototype.isInstantProfile):
1908         (WebInspector.NativeMemoryProfileType.prototype.isInstantProfile):
1909         * inspector/front-end/ProfileLauncherView.js:
1910         (WebInspector.ProfileLauncherView):
1911         (WebInspector.ProfileLauncherView.prototype.addProfileType):
1912         (WebInspector.ProfileLauncherView.prototype._updateControls):
1913         (WebInspector.MultiProfileLauncherView.prototype._updateControls):
1914         (WebInspector.MultiProfileLauncherView.prototype._profileTypeChanged):
1915         * inspector/front-end/ProfilesPanel.js:
1916         (WebInspector.ProfileType.prototype.isInstantProfile):
1917
1918 2013-03-07  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
1919
1920         [texmap] Remove direct access to clip state from clip stack
1921         https://bugs.webkit.org/show_bug.cgi?id=111630
1922
1923         Reviewed by Allan Sandfeld Jensen.
1924
1925         As we are now monitoring the clip state from
1926         TextureMapperGL/BitmapTextureGL, have direct access to clip state object
1927         would eventually make it dirty without properly setting the
1928         'clipStateDirty' flag. This bug intends to substitute direct access with
1929         auxiliary functions which would set the clip state dirty when necessary.
1930
1931         No new tests. No user visible behavior changed.
1932
1933         * platform/graphics/texmap/TextureMapperGL.cpp:
1934         (WebCore::TextureMapperGL::ClipStack::intersect):
1935         (WebCore::TextureMapperGL::ClipStack::setStencilIndex):
1936         (WebCore::TextureMapperGL::drawBorder):
1937         (WebCore::TextureMapperGL::drawTexture):
1938         (WebCore::TextureMapperGL::beginScissorClip):
1939         (WebCore::TextureMapperGL::beginClip):
1940         Replaced direct access with auxiliary functions.
1941
1942         * platform/graphics/texmap/TextureMapperGL.h:
1943         (ClipStack): Removed ClipStack::current() function.
1944         (WebCore::TextureMapperGL::ClipStack::getStencilIndex): Added.
1945         (WebCore::TextureMapperGL::ClipStack::isCurrentScissorBoxEmpty): Added.
1946
1947 2013-03-07  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
1948
1949         [Texturemapper] transform-style 'flat' value is broken
1950         https://bugs.webkit.org/show_bug.cgi?id=111566
1951
1952         Reviewed by Allan Sandfeld Jensen.
1953
1954         After changes from r144290, the CSS3 'transform-styles' property, when
1955         used with 'flat' value, resulted in non-stenciled rendering inside
1956         clipped area - vide example from Surfin' Safari blog:
1957         https://www.webkit.org/blog-files/3d-transforms/transform-style.html
1958
1959         This patch forces the clip state to be applied when binding the default
1960         surface.
1961
1962         No new tests. No user visible behavior changed.
1963
1964         * platform/graphics/texmap/TextureMapperGL.cpp:
1965         (WebCore::TextureMapperGL::ClipStack::apply):
1966         (WebCore::TextureMapperGL::ClipStack::applyIfNeeded): Added.
1967         Moved state cache check from apply() to applyIfNeeded().
1968
1969         (WebCore::BitmapTextureGL::clearIfNeeded):
1970         (WebCore::BitmapTextureGL::bind):
1971         (WebCore::TextureMapperGL::beginScissorClip):
1972         (WebCore::TextureMapperGL::beginClip):
1973         (WebCore::TextureMapperGL::endClip):
1974         * platform/graphics/texmap/TextureMapperGL.h:
1975         (ClipStack):
1976         Use applyIfNeeded() to check for clip state before clipping.
1977
1978 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
1979
1980         Web Inspector: refactoring: move TextEditorModel.Indent enum into TextUtils
1981         https://bugs.webkit.org/show_bug.cgi?id=111715
1982
1983         Reviewed by Pavel Feldman.
1984
1985         Move WebInspector.TextEditorModel.Indent into WebInspector.TextUtils namespace.
1986
1987         No new tests: no change in behaviour.
1988
1989         * inspector/front-end/SettingsScreen.js:
1990         (WebInspector.GenericSettingsTab):
1991         * inspector/front-end/TextEditorModel.js:
1992         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1993         * inspector/front-end/TextUtils.js:
1994
1995 2013-03-07  Ian Vollick  <vollick@chromium.org>
1996
1997         Fix painting phases for composited scrolling
1998         https://bugs.webkit.org/show_bug.cgi?id=107618
1999
2000         Reviewed by Simon Fraser.
2001
2002         With composited scrolling, the scrolling contents layer paints the 
2003         foreground and the main graphics layer paints the background. This 
2004         causes a few problems:
2005
2006           1) If we create a foreground layer, we end up with two layers painting 
2007              the foreground phase.
2008           2) Focus rings / outlines paint into the foreground layer, so they end
2009              up moving around with the scrolling contents.
2010           3) Neg z-order descendants paint in the the main graphics layer and
2011              will therefore not scroll.
2012
2013         To deal with 1) we need to stop painting the foreground into both the
2014         foreground and scrolling contents layers. We also need to ensure that
2015         the foreground layer is the right size and has the right offset from
2016         renderer if we're on the composited scrolling path.
2017
2018         To deal with 2) and 3), I have added a new graphics layer painting phase 
2019         flag -- GraphicsLayerPaintCompositedScroll -- and applied it to two
2020         layers in the subtree created by RenderLayerBacking. This ultimately
2021         affects the paint phase passed to RenderLayer::paintLayerContents and
2022         allows us to paint the focus rings, outlines and negative z-order
2023         descendants into the proper layers.
2024
2025         Tests: compositing/overflow/composited-scrolling-paint-phases.html
2026                compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html
2027                compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html
2028
2029         * page/Frame.h:
2030           Added a flag for including painting phases in the layer tree dump.
2031         (WebCore::GraphicsLayer::dumpProperties):
2032           Can now dump painting phase information, but only if requested.
2033         * platform/graphics/GraphicsLayerClient.h:
2034           Added a new entry to GraphicsLayerPaintingPhaseFlags for comp-scroll.
2035         (WebCore::RenderLayer::paintLayerContents):
2036           Updated the logic to account for the new comp-scroll-related paint
2037           phase flag.
2038         * rendering/RenderLayer.h:
2039           Added the RenderLayer painting phase counterpart to
2040           GraphicsLayerPaintCompositedScroll.
2041         * rendering/RenderLayerBacking.cpp:
2042         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2043           Ensures that the foreground layer is sized correctly for comp-scroll.
2044         (WebCore::RenderLayerBacking::updateScrollingLayers):
2045           If we have a foreground layer, the scrolling contents layer no
2046           longer gets assigned the foreground painting phase.
2047         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
2048           If we're comp-scrolling, then the primary layer gets the new phase.
2049         (WebCore::RenderLayerBacking::paintIntoLayer):
2050           Simply translates the new graphics layer painting phase to its
2051           render layer counterpart.
2052         (WebCore::RenderLayerCompositor::layerTreeAsText):
2053         * testing/Internals.cpp:
2054         (WebCore::Internals::layerTreeAsText):
2055         * testing/Internals.h:
2056         * testing/Internals.idl:
2057           The above changes are solely plumbing to allow layout tests to
2058           request that paint phase information be included in the layer tree
2059           dump.
2060
2061 2013-03-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2062
2063         [Qt] Use Qt5.1 supportedMimeTypes methods.
2064         https://bugs.webkit.org/show_bug.cgi?id=111185
2065
2066         Reviewed by Jocelyn Turcotte.
2067
2068         Uses the supportedMimeTypes() methods from QImageReader and QImageWriter when available.
2069
2070         * platform/MIMETypeRegistry.cpp:
2071         (WebCore::initializeSupportedImageMIMETypes):
2072         (WebCore::initializeSupportedImageMIMETypesForEncoding):
2073
2074 2013-03-07  Ilya Tikhonovsky  <loislo@chromium.org>
2075
2076         Web Inspector: Flame Chart. Stick item color to the function.
2077         https://bugs.webkit.org/show_bug.cgi?id=111697
2078
2079         Reviewed by Yury Semikhatsky.
2080
2081         Different nodes associated with a single function have to use the same color.
2082         Minor polish: do not filter out (idle) and (program) items. They were big due to an error on v8 side.
2083         Set minimum width to 0 for more precise picture.
2084
2085         * inspector/front-end/FlameChart.js:
2086         (WebInspector.FlameChart):
2087         (WebInspector.FlameChart.prototype._rootNodes):
2088         (WebInspector.FlameChart.prototype.draw):
2089         (WebInspector.FlameChart.prototype._drawNode):
2090         (WebInspector.FlameChart.prototype._drawBar):
2091
2092 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2093
2094         Web Inspector: [ACE] gutter size should be fixed.
2095         https://bugs.webkit.org/show_bug.cgi?id=111576
2096
2097         Reviewed by Pavel Feldman.
2098
2099         Add a custom ace editor build that supports setFixedGutterWidth configuration
2100         parameter and switch this setting on.
2101
2102         No new tests.
2103
2104         * inspector/front-end/AceTextEditor.js:
2105         (WebInspector.AceTextEditor): Switch fixedGutterWidth setting on.
2106         * inspector/front-end/ace/ace.js:
2107         (.):
2108
2109 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2110
2111         Unreviewed, rolling out r145059.
2112         http://trac.webkit.org/changeset/145059
2113         https://bugs.webkit.org/show_bug.cgi?id=111707
2114
2115         crash webkit build (Requested by tasak on #webkit).
2116
2117         * CMakeLists.txt:
2118         * GNUmakefile.list.am:
2119         * Target.pri:
2120         * WebCore.gypi:
2121         * WebCore.xcodeproj/project.pbxproj:
2122         * css/CSSAllInOne.cpp:
2123         * css/DocumentRuleSets.cpp:
2124         (WebCore::ShadowDistributedRules::collectMatchRequests):
2125         * css/DocumentRuleSets.h:
2126         * css/ElementRuleCollector.cpp: Removed.
2127         * css/ElementRuleCollector.h: Removed.
2128         * css/PageRuleCollector.cpp: Removed.
2129         * css/PageRuleCollector.h: Removed.
2130         * css/StyleResolver.cpp:
2131         (WebCore::leftToRightDeclaration):
2132         (WebCore):
2133         (WebCore::rightToLeftDeclaration):
2134         (WebCore::StyleResolver::State::ensureRuleList):
2135         (WebCore::StyleResolver::State::clear):
2136         (WebCore::StyleResolver::addMatchedProperties):
2137         (WebCore::StyleResolver::addElementStyleProperties):
2138         (MatchingUARulesScope):
2139         (WebCore::MatchingUARulesScope::MatchingUARulesScope):
2140         (WebCore::MatchingUARulesScope::~MatchingUARulesScope):
2141         (WebCore::MatchingUARulesScope::isMatchingUARules):
2142         (WebCore::StyleResolver::collectMatchingRules):
2143         (WebCore::StyleResolver::collectMatchingRulesForRegion):
2144         (WebCore::StyleResolver::sortAndTransferMatchedRules):
2145         (WebCore::StyleResolver::matchScopedAuthorRules):
2146         (WebCore::StyleResolver::matchHostRules):
2147         (WebCore::StyleResolver::matchAuthorRules):
2148         (WebCore::StyleResolver::matchUserRules):
2149         (WebCore::StyleResolver::matchUARules):
2150         (WebCore::StyleResolver::collectMatchingRulesForList):
2151         (WebCore::compareRules):
2152         (WebCore::StyleResolver::sortMatchedRules):
2153         (WebCore::StyleResolver::matchAllRules):
2154         (WebCore::StyleResolver::State::initForStyleResolve):
2155         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2156         (WebCore::StyleResolver::styleForElement):
2157         (WebCore::StyleResolver::styleForKeyframe):
2158         (WebCore::StyleResolver::pseudoStyleForElement):
2159         (WebCore::StyleResolver::styleForPage):
2160         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2161         (WebCore::StyleResolver::ruleMatches):
2162         (WebCore::StyleResolver::checkRegionSelector):
2163         (WebCore::comparePageRules):
2164         (WebCore::StyleResolver::matchPageRules):
2165         (WebCore::checkPageSelectorComponents):
2166         (WebCore::StyleResolver::matchPageRulesForList):
2167         (WebCore::StyleResolver::isLeftPage):
2168         (WebCore::StyleResolver::isFirstPage):
2169         (WebCore::StyleResolver::pageName):
2170         * css/StyleResolver.h:
2171         (WebCore::MatchRequest::MatchRequest):
2172         (MatchRequest):
2173         (StyleResolver):
2174         (MatchResult):
2175         (WebCore::StyleResolver::State::State):
2176         (State):
2177         (WebCore::StyleResolver::State::takeRuleList):
2178         (WebCore::StyleResolver::State::setSameOriginOnly):
2179         (WebCore::StyleResolver::State::isSameOriginOnly):
2180         (WebCore::StyleResolver::State::pseudoStyleRequest):
2181         (WebCore::StyleResolver::State::setMode):
2182         (WebCore::StyleResolver::State::mode):
2183         (WebCore::StyleResolver::State::matchedRules):
2184         (WebCore::StyleResolver::State::addMatchedRule):
2185         * inspector/InspectorCSSAgent.cpp:
2186         (WebCore::InspectorCSSAgent::willMatchRule):
2187         * inspector/InspectorCSSAgent.h:
2188         (WebCore):
2189         (InspectorCSSAgent):
2190         * inspector/InspectorInstrumentation.cpp:
2191         (WebCore):
2192         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2193         * inspector/InspectorInstrumentation.h:
2194         (WebCore):
2195         (InspectorInstrumentation):
2196         (WebCore::InspectorInstrumentation::willMatchRule):
2197
2198 2013-03-07  Kentaro Hara  <haraken@chromium.org>
2199
2200         Unreviewed. Rebaselined run-bindings-tests.
2201
2202         * bindings/scripts/test/V8/V8TestInterface.cpp:
2203         (WebCore):
2204         * bindings/scripts/test/V8/V8TestObj.cpp:
2205         (WebCore):
2206
2207 2013-03-07  Takashi Sakamoto  <tasak@google.com>
2208
2209         [Refactoring] Implement RuleCollector
2210         https://bugs.webkit.org/show_bug.cgi?id=109916
2211
2212         Reviewed by Antti Koivisto.
2213
2214         Implemented rule collector for an element and collector for a page.
2215         Not all members in class State are required entire while resolving
2216         a style.
2217
2218         No new tests, because just refactoring.
2219
2220         * CMakeLists.txt:
2221         * GNUmakefile.list.am:
2222         * Target.pri:
2223         * WebCore.gypi:
2224         * WebCore.xcodeproj/project.pbxproj:
2225         * css/CSSAllInOne.cpp:
2226         Added ElementRuleCollector and PageRuleCollector.
2227         * css/DocumentRuleSets.cpp:
2228         (WebCore::ShadowDistributedRules::collectMatchRequests):
2229         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
2230         removed from here.
2231         * css/DocumentRuleSets.h:
2232         (WebCore::ShadowDistributedRules::isEmpty):
2233         Added to quickly check whether there exist any ShadowDistributedRules
2234         or not.
2235         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
2236         (WebCore):
2237         (WebCore::ElementRuleCollector::matchedResult):
2238         (WebCore::ElementRuleCollector::matchedRuleList):
2239         (WebCore::ElementRuleCollector::addMatchedRule):
2240         (WebCore::ElementRuleCollector::clearMatchedRules):
2241         (WebCore::ElementRuleCollector::ensureRuleList):
2242         (WebCore::ElementRuleCollector::addElementStyleProperties):
2243         (WebCore::ElementRuleCollector::collectMatchingRules):
2244         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
2245         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
2246         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
2247         (WebCore::ElementRuleCollector::matchHostRules):
2248         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
2249         (WebCore::ElementRuleCollector::matchAuthorRules):
2250         (WebCore::ElementRuleCollector::matchUserRules):
2251         (WebCore::ElementRuleCollector::matchUARules):
2252         (WebCore::ElementRuleCollector::ruleMatches):
2253         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
2254         (WebCore::ElementRuleCollector::sortMatchedRules):
2255         (WebCore::ElementRuleCollector::matchAllRules):
2256         Moved these methods from StyleResolver to this class.
2257         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
2258         This method is used for checking whether a given element can share
2259         a cache.
2260         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
2261         (WebCore):
2262         (WebCore::ElementRuleCollector::ElementRuleCollector):
2263         Use styleResolver instance to initialize its member variables, i.e.
2264         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
2265         StyleScopedResolver.
2266         (ElementRuleCollector):
2267         (WebCore::ElementRuleCollector::setMode):
2268         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
2269         (WebCore::ElementRuleCollector::setSameOriginOnly):
2270         (WebCore::ElementRuleCollector::setRegionForStyling):
2271         Mode, SameOriginOnly, RegionForStyling are only used while collecting
2272         matched rules.
2273         (WebCore::ElementRuleCollector::setMedium):
2274         Need to know which default stylesheet should be looked up.
2275         (WebCore::ElementRuleCollector::document):
2276         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
2277         (WebCore::comparePageRules):
2278         (WebCore::PageRuleCollector::isLeftPage):
2279         (WebCore::PageRuleCollector::isFirstPage):
2280         (WebCore::PageRuleCollector::pageName):
2281         (WebCore::PageRuleCollector::matchAllPageRules):
2282         (WebCore::PageRuleCollector::matchPageRules):
2283         (WebCore::checkPageSelectorComponents):
2284         (WebCore::PageRuleCollector::matchPageRulesForList):
2285         Moved from StyleResolver.
2286         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
2287         (WebCore):
2288         (WebCore::PageRuleCollector::PageRuleCollector):
2289         (PageRuleCollector):
2290         (WebCore::PageRuleCollector::matchedResult):
2291         * css/StyleResolver.cpp:
2292         (WebCore):
2293         (WebCore::StyleResolver::State::clear):
2294         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
2295         (WebCore::StyleResolver::State::initForStyleResolve):
2296         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2297         (WebCore::StyleResolver::styleForElement):
2298         (WebCore::StyleResolver::styleForKeyframe):
2299         (WebCore::StyleResolver::pseudoStyleForElement):
2300         (WebCore::StyleResolver::styleForPage):
2301         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2302         (WebCore::StyleResolver::applyMatchedProperties):
2303         * css/StyleResolver.h:
2304         (WebCore::MatchRequest::MatchRequest):
2305         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
2306         state.
2307         (MatchRequest):
2308         (WebCore::StyleResolver::selectorFilter):
2309         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
2310         (StyleResolver):
2311         (MatchResult):
2312         (WebCore::StyleResolver::State::State):
2313         To pass ASSERT in StyleResolver::applyProperties, need to keep
2314         m_regionForStyling.
2315         (State):
2316         (WebCore::StyleResolver::State::regionForStyling):
2317         (WebCore::StyleResolver::State::useSVGZoomRules):
2318         (WebCore::StyleResolver::hasSelectorForId):
2319         (WebCore):
2320         (WebCore::checkRegionSelector):
2321         * inspector/InspectorCSSAgent.cpp:
2322         (WebCore::InspectorCSSAgent::willMatchRule):
2323         Removed StyleResolver from its parameter list. Instead, added
2324         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
2325         * inspector/InspectorCSSAgent.h:
2326         (WebCore):
2327         (InspectorCSSAgent):
2328         * inspector/InspectorInstrumentation.cpp:
2329         (WebCore):
2330         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2331         * inspector/InspectorInstrumentation.h:
2332         (WebCore):
2333         (InspectorInstrumentation):
2334         (WebCore::InspectorInstrumentation::willMatchRule):
2335
2336 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2337
2338         Web Inspector: [ACE] add experimental breakpoint support
2339         https://bugs.webkit.org/show_bug.cgi?id=111573
2340
2341         Reviewed by Pavel Feldman.
2342
2343         No new tests.
2344
2345         - Implement attributes model for ace editor. Update attribute
2346         locations by handling onTextChange event from editor.
2347         - Implement breakpoints atop of attributes model.
2348
2349         * inspector/front-end/AceTextEditor.js:
2350         (WebInspector.AceTextEditor):
2351         (WebInspector.AceTextEditor.prototype._updateBreakpoints):
2352         (WebInspector.AceTextEditor.prototype._updateLineAttributes):
2353         (WebInspector.AceTextEditor.prototype._onTextChange):
2354         (WebInspector.AceTextEditor.prototype.addBreakpoint):
2355         (WebInspector.AceTextEditor.prototype.removeBreakpoint):
2356         (WebInspector.AceTextEditor.prototype.getAttribute):
2357         (WebInspector.AceTextEditor.prototype.setAttribute):
2358         (WebInspector.AceTextEditor.prototype.removeAttribute):
2359         * inspector/front-end/ace/acedevtools.css:
2360         (.ace-editor-container):
2361         (.ace_gutter-cell.webkit-breakpoint):
2362         (.ace_gutter-cell.webkit-breakpoint-conditional):
2363         (.ace_gutter-cell.webkit-breakpoint-disabled):
2364         (.ace_gutter-cell):
2365
2366 2013-03-07  Antoine Quint  <graouts@apple.com>
2367
2368         Web Inspector: identify layers for CSS generated content in LayerTreeAgent
2369         https://bugs.webkit.org/show_bug.cgi?id=111551
2370
2371         Layers can be associated with pseudo elements, elements that are generated
2372         when ::before or ::after pseudo-classes are used to style an element and
2373         provide additional rendering using the CSS "content" property. In order to
2374         identify that a layer is associated to a pseudo element, we add a new set of
2375         optional properties on the Layer object: "isGeneratedContent", "pseudoElementId"
2376         and "pseudoClass".
2377
2378         We need to provide the "pseudoElementId" for the same reason we provide a
2379         "nodeId" for the Layer. This is so that the front-end can identify that a
2380         layer whose "layerId" may have changed between two layer tree updates is
2381         used to render content for the same pseudo element.
2382
2383         In the instance that a layer is rendering generated content, we also set
2384         the "nodeId" to be the generating node's id. The generating node is the
2385         node in the DOM that the user styled using ::before or ::after pseudo-classes.
2386         We also add the pseudo-class used as the "pseudoClass" property such that the
2387         front-end may provide useful information to the user about what type of
2388         pseudo-class yielded the generation of this layer. We also deal with the
2389         possibility that the layer is a reflection for a pseudo element.
2390     
2391         Since pseudo elements are not part of the user-visible DOM, and thus can't be
2392         pushed to the front-end, we maintain a special ID hash map in the LayerTreeAgent.
2393         In order to be able to unbind a pseudo element id and a pseudo element, we add a
2394         destructor method to PseudoElement and provide a new instrumentation call so that
2395         the LayerTreeAgent may be notified of a PseudoElement being destroyed. This
2396         reflects the principle we use to update the RenderLayer bindings when a
2397         RenderLayer is destroyed, as notified by the RenderLayerCompositor.
2398
2399         Reviewed by Simon Fraser.
2400
2401         Test: inspector-protocol/layers/layers-generated-content.html
2402
2403         * dom/PseudoElement.cpp:
2404         (WebCore::PseudoElement::~PseudoElement): New destructor used to notify
2405         InspectorInstrumentation of a PseudoElement being destroyed, such that
2406         it can eventually be relayed to the InspectorLayerTreeAgent.
2407         (WebCore):
2408         * dom/PseudoElement.h:
2409         (PseudoElement):
2410         * inspector/Inspector.json: Add the new PseudoElementId type used for
2411         the new "pseudoElementId" property on Layer, to which we also add the
2412         "isGeneratedContent" and "pseudoClass" properties.
2413         * inspector/InspectorInstrumentation.cpp:
2414         (WebCore):
2415         (WebCore::InspectorInstrumentation::pseudoElementDestroyedImpl):
2416         * inspector/InspectorInstrumentation.h:
2417         (WebCore):
2418         (InspectorInstrumentation):
2419         (WebCore::InspectorInstrumentation::pseudoElementDestroyed): New method
2420         called in the PseudoElement destructor used to relay the fact that a
2421         PseudoElement was destroyed to the InspectorLayerTreeAgent.
2422         * inspector/InspectorLayerTreeAgent.cpp:
2423         (WebCore::InspectorLayerTreeAgent::reset): Clear the new PseudoElement
2424         identifier maps.
2425         (WebCore::InspectorLayerTreeAgent::pseudoElementDestroyed): Remove any
2426         identifier binding for the provided PseudoElement being destroyed.
2427         (WebCore):
2428         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): Set the new
2429         "isGeneratedContent", "pseudoElementId" and "pseudoClass" properties on
2430         the Layer object for layers associated with a pseudo element.
2431         (WebCore::InspectorLayerTreeAgent::bind): Use emptyString() instead of "".
2432         (WebCore::InspectorLayerTreeAgent::unbind): Use an iterator instead of a
2433         get() and remove() combination in order to reduce lookups and mimick the
2434         code written for unbindPseudoElement().
2435         (WebCore::InspectorLayerTreeAgent::bindPseudoElement): Binds the provided
2436         PseudoElement to a unique identifier.
2437         (WebCore::InspectorLayerTreeAgent::unbindPseudoElement): Unbinds the
2438         provided PseudoElement from its unique identifier.
2439         * inspector/InspectorLayerTreeAgent.h:
2440         (InspectorLayerTreeAgent):
2441
2442 2013-03-07  Keishi Hattori  <keishi@webkit.org>
2443
2444         Add clear button to date/time input types
2445         https://bugs.webkit.org/show_bug.cgi?id=111319
2446
2447         Reviewed by Kent Tamura.
2448
2449         We want to remove the clear button from the calendar picker (Bug 109439)
2450         so we are adding the clear button to the right side of the input element.
2451
2452         Tests: fast/forms/date-multiple-fields/date-multiple-fields-clearbutton-change-and-input-events.html
2453                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-change-and-input-events.html
2454                fast/forms/month-multiple-fields/month-multiple-fields-clearbutton-change-and-input-events.html
2455                fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-change-and-input-events.html
2456                fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-change-and-input-events.html
2457
2458         * CMakeLists.txt: Added ClearButtonElement.cpp
2459         * GNUmakefile.list.am: Ditto.
2460         * Target.pri: Ditto.
2461         * WebCore.gypi: Ditto.
2462         * WebCore.vcproj/WebCore.vcproj: Ditto.
2463         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2464         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2465         * WebCore.xcodeproj/project.pbxproj: Ditto.
2466         * css/html.css:
2467         (input::-webkit-clear-button): Styles for the clear button.
2468         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2469         (WebCore::BaseMultipleFieldsDateAndTimeInputType::editControlValueChanged):
2470         (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
2471         (WebCore::BaseMultipleFieldsDateAndTimeInputType::~BaseMultipleFieldsDateAndTimeInputType):
2472         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
2473         (WebCore::BaseMultipleFieldsDateAndTimeInputType::destroyShadowSubtree):
2474         (WebCore::BaseMultipleFieldsDateAndTimeInputType::disabledAttributeChanged):
2475         (WebCore::BaseMultipleFieldsDateAndTimeInputType::requiredAttributeChanged): Hide clear button if the value is required.
2476         (WebCore):
2477         (WebCore::BaseMultipleFieldsDateAndTimeInputType::readonlyAttributeChanged):
2478         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue):
2479         (WebCore::BaseMultipleFieldsDateAndTimeInputType::focusAndSelectClearButtonOwner): Called on mouse down on clear button.
2480         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldClearButtonRespondToMouseEvents):
2481         (WebCore::BaseMultipleFieldsDateAndTimeInputType::clearValue):
2482         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateClearButtonVisibility): We want to hide the clear button if the value is required or the value is empty.
2483         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2484         (BaseMultipleFieldsDateAndTimeInputType):
2485         * html/HTMLInputElement.cpp:
2486         (WebCore::HTMLInputElement::updateClearButtonVisibility):
2487         (WebCore):
2488         (WebCore::HTMLInputElement::requiredAttributeChanged):
2489         * html/HTMLInputElement.h:
2490         (HTMLInputElement):
2491         * html/InputType.cpp:
2492         (WebCore::InputType::requiredAttributeChanged): Notifies the InputType that the required attribute has changed.
2493         (WebCore):
2494         (WebCore::InputType::updateClearButtonVisibility):
2495         * html/InputType.h:
2496         (InputType):
2497         * html/shadow/ClearButtonElement.cpp: Added.
2498         (WebCore):
2499         (WebCore::ClearButtonElement::ClearButtonElement):
2500         (WebCore::ClearButtonElement::create):
2501         (WebCore::ClearButtonElement::detach):
2502         (WebCore::ClearButtonElement::releaseCapture): Stop capturing mouse events.
2503         (WebCore::ClearButtonElement::defaultEventHandler):
2504         * html/shadow/ClearButtonElement.h: Added.
2505         (WebCore):
2506         (ClearButtonElement):
2507         (ClearButtonOwner):
2508         (WebCore::ClearButtonElement::ClearButtonOwner::~ClearButtonOwner):
2509         (WebCore::ClearButtonElement::removeClearButtonOwner):
2510         (WebCore::ClearButtonElement::isMouseFocusable):
2511
2512 2013-03-07  Eugene Klyuchnikov  <eustas@chromium.org>
2513
2514         Web Inspector: Refactorings: Prepare SuggestBox for reuse.
2515         https://bugs.webkit.org/show_bug.cgi?id=111301
2516
2517         Reviewed by Alexander Pavlov.
2518
2519         1) Remove userEnteredText from delegate interface.
2520            Pass prefix to updateSuggestions instead.
2521         2) Clarify that suggestions array is never null.
2522
2523         * inspector/front-end/SuggestBox.js:
2524         (WebInspector.SuggestBox): Renamed parameter/member.
2525         (WebInspector.SuggestBox.prototype._updateItems):
2526         Minor readability changes.
2527         (WebInspector.SuggestBox.prototype._canShowBox):
2528         Use userEnteredText parameter.
2529         (WebInspector.SuggestBox.prototype.updateSuggestions):
2530         Pass userEnteredText to _canShowBox.
2531         * inspector/front-end/DatabaseQueryView.js: Fix JSDocs.
2532         * inspector/front-end/RuntimeModel.js: Ditto.
2533         * inspector/front-end/TextPrompt.js: Ditto.
2534         (WebInspector.TextPrompt.prototype._completionsReady):
2535         Pass userEnteredText to updateSuggestions.
2536
2537 2013-03-07  Victor Carbune  <vcarbune@chromium.org>
2538
2539         TextTrackRegion Constructor
2540         https://bugs.webkit.org/show_bug.cgi?id=110511
2541
2542         Reviewed by Adam Barth.
2543
2544         This is an initial patch for implementing the TextTrackRegion
2545         defined in the "WebVTT Extension: Regions for rendering cue groups":
2546         https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/region.html
2547
2548         The feature components are hidden behind the WEBVTT_REGIONS flag
2549         and is currently disabled by default in all ports and tests skipped.
2550
2551         Test: media/track/regions-webvtt/text-track-region-constructor.html
2552
2553         * WebCore.gypi: Added files to be included for building Chromium with
2554         feature enabled (it is disabled by default).
2555         * html/track/TextTrackRegion.cpp: Added.
2556         (WebCore):
2557         (WebCore::TextTrackRegion::TextTrackRegion):
2558         (WebCore::TextTrackRegion::~TextTrackRegion):
2559         (WebCore::TextTrackRegion::setId): Setter.
2560         (WebCore::TextTrackRegion::setWidth): Setter.
2561         (WebCore::TextTrackRegion::setHeight): Setter.
2562         (WebCore::TextTrackRegion::setRegionAnchorX): Setter.
2563         (WebCore::TextTrackRegion::setRegionAnchorY): Setter.
2564         (WebCore::TextTrackRegion::setViewportAnchorX): Setter.
2565         (WebCore::TextTrackRegion::setViewportAnchorY): Setter.
2566         (WebCore::TextTrackRegion::scroll): Getter. Internally, the scroll
2567         value is stored as a boolean, but when returned is converted to either
2568         the empty string or "up".
2569         (WebCore::TextTrackRegion::setScroll): Setter.
2570         (WebCore::TextTrackRegion::setRegionSettings): Not used yet (see b/109818)
2571         * html/track/TextTrackRegion.h: Added.
2572         (WebCore):
2573         (TextTrackRegion):
2574         (WebCore::TextTrackRegion::create):
2575         (WebCore::TextTrackRegion::track): Getter.
2576         (WebCore::TextTrackRegion::id): Getter.
2577         (WebCore::TextTrackRegion::width): Getter.
2578         (WebCore::TextTrackRegion::height): Getter.
2579         (WebCore::TextTrackRegion::regionAnchorX): Getter.
2580         (WebCore::TextTrackRegion::regionAnchorY): Getter.
2581         (WebCore::TextTrackRegion::viewportAnchorX): Getter.
2582         (WebCore::TextTrackRegion::viewportAnchorY): Getter.
2583         (WebCore::TextTrackRegion::regionSettings): Getter, used only internally (see b/109818).
2584         * html/track/TextTrackRegion.idl: Added.
2585         * page/DOMWindow.idl: Constructor support.
2586
2587 2013-03-07  Dan Carney  <dcarney@google.com>
2588
2589         [v8] remove latin-1 transition flag
2590         https://bugs.webkit.org/show_bug.cgi?id=111692
2591
2592         Reviewed by Jochen Eisinger.
2593
2594         No new tests. No change in functionality.
2595
2596         * bindings/v8/V8ValueCache.cpp:
2597         (WebCore::makeExternalString):
2598
2599 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2600
2601         Web Inspector: NavigatorView should show (program) for uiSourceCodes with empty name.
2602         https://bugs.webkit.org/show_bug.cgi?id=111691
2603
2604         Reviewed by Alexander Pavlov.
2605
2606         Made String.prototype methods return string literal, not String object.
2607
2608         * inspector/front-end/utilities.js:
2609         (String.prototype.escapeCharacters):
2610
2611 2013-03-07  Eugene Klyuchnikov  <eustas@chromium.org>
2612
2613         Web Inspector: Cmd+L (Go-to-Line) masks Go to location bar action
2614         https://bugs.webkit.org/show_bug.cgi?id=111357
2615
2616         Reviewed by Pavel Feldman.
2617
2618         Allow panel shortcut handlers to bubble event.
2619
2620         * inspector/front-end/GoToLineDialog.js:
2621         (WebInspector.GoToLineDialog.install): Minor refactoring, added JSDocs.
2622         (WebInspector.GoToLineDialog._show): Added JSDocs and return value.
2623         * inspector/front-end/Panel.js:
2624         (WebInspector.Panel.prototype.handleShortcut):
2625         Mark event as handled iff handler returned true.
2626         * inspector/front-end/ScriptsPanel.js: Added return values to handlers.
2627         * inspector/front-end/TimelinePanel.js: Ditto.
2628
2629 2013-03-06  Takashi Sakamoto  <tasak@google.com>
2630
2631         Box-shadow displayed improperly with border-radius.
2632         https://bugs.webkit.org/show_bug.cgi?id=111256
2633
2634         Reviewed by Simon Fraser.
2635
2636         RoundedRect::adjustRadii doesn't adjust radii correctly, because
2637         the method compares maxRadiusWidth with maxRadiusHeight. However,
2638         we have to compare maxRadiusWidth / rect.width() with
2639         maxRadiusHeight / rect.height().
2640
2641         Test: fast/borders/border-radius-with-box-shadow-01.html
2642
2643         * platform/graphics/RoundedRect.cpp:
2644         (WebCore::RoundedRect::adjustRadii):
2645         Should check which ratio is smaller.
2646
2647 2013-03-06  Mike West  <mkwst@chromium.org>
2648
2649         [V8] Preprocess constant values to avoid a "static_cast<signed int>" in CodeGeneratorV8.
2650         https://bugs.webkit.org/show_bug.cgi?id=111625
2651
2652         Reviewed by Kentaro Hara.
2653
2654         When processing constants in IDL files, CodeGeneratorV8 currently runs
2655         the values through 'static_cast<signed int>' in the generated code. We
2656         can avoid this miniscule bit of overhead by preprocessing the hex value
2657         in Perl when generating the code.
2658
2659         The FIXME has been in the code since it originally landed in 2009[1].
2660         Now's as good a time as any to take care of it.
2661
2662         [1]: http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm?rev=144976#L2933
2663
2664         * bindings/scripts/CodeGeneratorV8.pm:
2665         (GenerateImplementation):
2666             If we're presented with a string which begins with '0x', run it
2667             through some fairly obtuse Perlisms to first convert from a hex
2668             string to an integer ('hex($value)'), "pack" the integer as an
2669             unsigned integer ('pack("I", ...)'), and then "unpack" it as a
2670             signed integer ('unpack("i", ...)'). Because that's _of course_
2671             how you would do things.
2672
2673 2013-03-06  PaweĊ‚ Forysiuk  <tuxator@o2.pl>
2674
2675         WebKit does not build without accelerated compositing after Changeset 144823
2676         https://bugs.webkit.org/show_bug.cgi?id=111597
2677
2678         Reviewed by Kentaro Hara.
2679
2680         Properly guard functions ifdefed in ScrollingCoordinator.h.
2681         Remove redundant checks and fallback code inside those functions.
2682
2683         * page/scrolling/ScrollingCoordinator.cpp:
2684         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea):
2685         (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea):
2686         (WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea):
2687         (WebCore):
2688
2689 2013-03-06  Hajime Morrita  <morrita@google.com>
2690
2691         Custom Elements Refactoring: CustomElementConstructor API shouldn't bound to HTMLElement
2692         https://bugs.webkit.org/show_bug.cgi?id=111678
2693
2694         Reviewed by Kentaro Hara.
2695
2696         The latest Custom Elements standard supports non-HTML custom elements. Even though current implementation
2697         support only HTML, it'd be better off to make API generic enough to support them.
2698
2699         This change
2700
2701         - eliminates HTMLElement from the API signature by replacing it with Element, and
2702         - rename V8HTMLCustomElement to V8CustomElement.
2703
2704         No new tests, just changing signatures and a class name.
2705
2706         * WebCore.gypi:
2707         * bindings/v8/V8CustomElement.cpp: Renamed from Source/WebCore/bindings/v8/V8HTMLCustomElement.cpp.
2708         (WebCore):
2709         (WebCore::findWrapperTypeOf):
2710         (WebCore::V8CustomElement::createWrapper):
2711         * bindings/v8/V8CustomElement.h: Renamed from Source/WebCore/bindings/v8/V8HTMLCustomElement.h.
2712         (WebCore):
2713         (V8CustomElement):
2714         (WebCore::V8CustomElement::toV8):
2715         (WebCore::V8CustomElement::wrap):
2716         (WebCore::HTMLCustomElement::wrap):
2717         * bindings/v8/custom/V8CustomElementConstructorCustom.cpp:
2718         (WebCore::V8CustomElementConstructor::callAsFunctionCallback):
2719         * dom/CustomElementConstructor.cpp:
2720         (WebCore::CustomElementConstructor::createElement):
2721         * dom/CustomElementConstructor.h:
2722         (WebCore):
2723         (CustomElementConstructor):
2724         * dom/CustomElementRegistry.cpp:
2725         (WebCore::CustomElementRegistry::constructorOf):
2726         (WebCore::CustomElementRegistry::createElement):
2727         * dom/CustomElementRegistry.h:
2728         (WebCore):
2729         (CustomElementRegistry):
2730         * dom/Document.cpp: Ensured that the document is an HTML.
2731         (WebCore::Document::registerElement):
2732         * dom/Document.idl:
2733         * dom/make_names.pl:
2734         (printWrapperFactoryCppFile):
2735         * html/HTMLDocument.idl: Moved an API to Document.idl
2736
2737 2013-03-06  Tim Horton  <timothy_horton@apple.com>
2738
2739         TileCache debug minimap should fit inside the intersection of the visible rect and exposed rect
2740         https://bugs.webkit.org/show_bug.cgi?id=111655
2741         <rdar://problem/13355773>
2742
2743         Reviewed by Simon Fraser.
2744
2745         If content clips to the exposed rect, make the TileCache minimap fit in the exposed rect too.
2746
2747         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2748         (WebCore::ScrollingCoordinatorMac::commitTreeState):
2749         * platform/graphics/TiledBacking.h:
2750         * platform/graphics/ca/mac/TileCache.mm:
2751         (WebCore::TileCache::updateTileCoverageMap):
2752
2753 2013-03-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2754
2755         Unreviewed, rolling out r144726.
2756         http://trac.webkit.org/changeset/144726
2757         https://bugs.webkit.org/show_bug.cgi?id=111681
2758
2759         caused performance regression for Dromaeo attribute tests.
2760         (Requested by arpitab on #webkit).
2761
2762         * dom/Element.h:
2763         (WebCore::ElementData::getAttributeItemIndex):
2764
2765 2013-03-04  Kinuko Yasuda  <kinuko@chromium.org>
2766
2767         File.lastModifiedDate() should return the current date/time if the file date/time is not available
2768         https://bugs.webkit.org/show_bug.cgi?id=111403
2769
2770         Reviewed by Kent Tamura.
2771
2772         Per the recent File API spec change:
2773         http://www.w3.org/TR/2012/WD-FileAPI-20121025/#dfn-lastModifiedDate
2774
2775         Test: http/tests/local/fileapi/script-tests/file-last-modified-after-delete.js:
2776
2777         * fileapi/File.cpp:
2778         (WebCore::File::lastModifiedDate): Changed to return the current date/time instead null if the valid file date/time is not available.
2779         * fileapi/File.h:
2780         (File):
2781
2782 2013-03-06  Philippe Liard  <pliard@chromium.org>
2783
2784         Make RuleData support up to 8191 selectors
2785         https://bugs.webkit.org/show_bug.cgi?id=111663
2786
2787         Reviewed by Andreas Kling.
2788
2789         r125294 made RuleData consume less memory by replacing a pointer with
2790         an index encoded on 12 bits.
2791         This unfortunately breaks Chrome for Android (and others) when a lot of
2792         CSS is used or more precisely when selectorIndex cannot be stored on 12
2793         bits.
2794
2795         Threfore this change decreases the number of bits used to store
2796         m_position by 1 (from 19 to 18) and adds this extra bit to
2797         m_selectorIndex so that values up to 8191 can be stored safely without
2798         overflowing.
2799
2800         * css/RuleSet.h:
2801         (RuleData):
2802
2803 2013-03-06  Seokju Kwon  <seokju.kwon@gmail.com>
2804
2805         Web Inspector: Remove unused code from contextmenu of element panel
2806         https://bugs.webkit.org/show_bug.cgi?id=111658
2807
2808         Reviewed by Pavel Feldman.
2809
2810         No new tests (no functional changes).
2811
2812         * inspector/front-end/ElementsPanel.js:
2813         (WebInspector.ElementsPanel.prototype._contextMenuEventFired.set get var):
2814         * inspector/front-end/ElementsTreeOutline.js:
2815         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
2816
2817 2013-03-06  Julien Chaffraix  <jchaffraix@webkit.org>
2818
2819         [CSS Grid Layout] Extend our grammar to support 2 positions for grid-{row|column}
2820         https://bugs.webkit.org/show_bug.cgi?id=110777
2821
2822         Reviewed by Tony Chang.
2823
2824         Now that we support all the logical grid properties, we can change grid-{row|column}
2825         into shorthands. That's what this change does along with extending our parsing support
2826         to handle 2 positions.
2827
2828         Tests: fast/css-grid-layout/grid-item-column-row.html
2829                fast/css-grid-layout/grid-item-end-after-get-set.html
2830                fast/css-grid-layout/grid-item-start-before-get-set.html
2831
2832         * css/CSSComputedStyleDeclaration.cpp:
2833         Removed grid-{row|column} from computedProperties as they are shorthands (see comments
2834         at computedProperties definition).
2835
2836         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2837         (WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForGridShorthand):
2838         Switched to using the StylePropertyShorthand and reusing the existing longhand code.
2839
2840         * css/CSSComputedStyleDeclaration.h:
2841         Added getCSSPropertyValuesForGridShorthand.
2842
2843         * css/CSSParser.cpp:
2844         (WebCore::CSSParser::parseValue):
2845         (WebCore::CSSParser::parseGridItemPositionShorthand):
2846         Added custom parsing for the shorthand, that builds on top of the longhand code.
2847
2848         * css/CSSParser.h:
2849         Added parseGridItemPositionShorthand.
2850
2851         * css/StyleResolver.cpp:
2852         (WebCore::StyleResolver::applyProperty):
2853         Removed the previous handling as shorthand are expanded at parse time.
2854
2855         * css/StylePropertySet.cpp:
2856         (WebCore::StylePropertySet::getPropertyValue):
2857         Added the new shorthands to the list.
2858
2859         * css/StylePropertyShorthand.cpp:
2860         (WebCore::webkitGridColumnShorthand):
2861         (WebCore::webkitGridRowShorthand):
2862         (WebCore::shorthandForProperty):
2863         * css/StylePropertyShorthand.h:
2864         Registered grid-{row|column} as shorthands.
2865
2866 2013-03-06  Kenneth Russell  <kbr@google.com>
2867
2868         [Chromium] Fix byte ordering bugs reading back WebGL canvases' content on Android
2869         https://bugs.webkit.org/show_bug.cgi?id=111661
2870
2871         Reviewed by James Robinson.
2872
2873         No new tests; covered by existing tests. Ran WebGL conformance
2874         tests on Android and desktop Linux to verify fix.
2875
2876         * platform/chromium/support/GraphicsContext3DChromium.cpp:
2877         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
2878             Avoid incorrect byte swap on Android and other OSs which don't
2879             swizzle R and B channels.
2880
2881 2013-03-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2882
2883         [EFL] Improve warning messages when input value is out of range.
2884         https://bugs.webkit.org/show_bug.cgi?id=111534
2885
2886         Reviewed by Laszlo Gombos.
2887
2888         Show input value range when user inputs greater or less value.
2889
2890         * platform/efl/LocalizedStringsEfl.cpp:
2891         (WebCore::validationMessageRangeOverflowText):
2892         (WebCore::validationMessageRangeUnderflowText):
2893
2894 2013-03-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2895
2896         [EFL][WK2] Enable interactive form validation for email and url input type validation
2897         https://bugs.webkit.org/show_bug.cgi?id=111026
2898
2899         Reviewed by Laszlo Gombos.
2900
2901         WebKit EFL can check if input value is valid by enabling this feature.
2902
2903         * platform/efl/LocalizedStringsEfl.cpp: Change validation messages of email and url the same with chromium port.
2904         (WebCore::validationMessageTypeMismatchForEmailText):
2905         (WebCore::validationMessageTypeMismatchForMultipleEmailText):
2906         (WebCore::validationMessageTypeMismatchForURLText):
2907         * platform/efl/RenderThemeEfl.cpp: Add type checking conditions for email and url.
2908         (WebCore::RenderThemeEfl::supportsDataListUI):
2909
2910 2013-03-06  Aaron Colwell  <acolwell@chromium.org>
2911
2912         Remove WebCore::Node::isActiveNode() since it isn't called anywhere.
2913         https://bugs.webkit.org/show_bug.cgi?id=111646
2914
2915         Reviewed by Kentaro Hara.
2916
2917         No new tests. This removes dead code.
2918
2919         * dom/Node.h:
2920         (Node):
2921         * html/HTMLAudioElement.h:
2922
2923 2013-03-06  Abhishek Arya  <inferno@chromium.org>
2924
2925         Crash in SVGViewSpec::viewTarget
2926         https://bugs.webkit.org/show_bug.cgi?id=111648
2927
2928         Reviewed by Philip Rogers.
2929
2930         * svg/SVGViewSpec.cpp:
2931         (WebCore::SVGViewSpec::viewTarget):
2932
2933 2013-03-06  Benjamin Poulain  <benjamin@webkit.org>
2934
2935         WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
2936         https://bugs.webkit.org/show_bug.cgi?id=42696
2937
2938         Reviewed by Andreas Kling.
2939
2940         Since the method acts directly on a WebCore element and strictly test
2941         HTMLInputElement::shouldAutoComplete(), the test function is moved to internals.
2942
2943         * testing/Internals.cpp:
2944         (WebCore::Internals::elementShouldAutoComplete):
2945         * testing/Internals.h:
2946         * testing/Internals.idl:
2947
2948 2013-03-06  Alexey Proskuryakov  <ap@apple.com>
2949
2950         [Mac] Synthetic ResourceResponses cannot be sent over IPC without losing most information
2951         https://bugs.webkit.org/show_bug.cgi?id=111623
2952
2953         Reviewed by Brady Eidson.
2954
2955         * WebCore.exp.in: Exported functions for building synthetic responses.
2956
2957         * platform/network/ResourceResponseBase.cpp:
2958         * platform/network/ResourceResponseBase.h:
2959         Added a lot of FIXMEs.
2960
2961         * platform/network/cf/ResourceResponse.h:
2962         (WebCore::ResourceResponse::ResourceResponse):
2963         (WebCore::ResourceResponse::platformResponseIsUpToDate):
2964         Track m_platformResponseIsUpToDate flag as well as we can. Currently, it will
2965         be incorrect if a real platform response gets mutated.
2966
2967         * platform/network/cf/ResourceResponseCFNet.cpp:
2968         (WebCore::ResourceResponse::cfURLResponse): Added a FIXME about how useless this
2969         function is when it tries to create a new CFURLResponse.
2970
2971         * platform/network/mac/ResourceResponseMac.mm:
2972         (WebCore::ResourceResponse::initNSURLResponse): Added a FIXME.
2973         (WebCore::ResourceResponse::nsURLResponse): Added a return to make logic more clear.
2974         (WebCore::ResourceResponse::ResourceResponse): Track m_platformResponseIsUpToDate.
2975
2976         * platform/network/blackberry/ResourceResponse.h:
2977         * platform/network/curl/ResourceResponse.h:
2978         * platform/network/qt/ResourceResponse.h:
2979         * platform/network/soup/ResourceResponse.h:
2980         * platform/network/win/ResourceResponse.h:
2981         These platforms do not keep a platform response, so it's never up to date, and
2982         WebCore data needs to be serialized.
2983
2984 2013-03-06  Dana Jansens  <danakj@chromium.org>
2985
2986         [chromium] Remove WebSharedGraphicsContext3D class
2987         https://bugs.webkit.org/show_bug.cgi?id=111492
2988
2989         Reviewed by James Robinson.
2990
2991         Removing dead code, no new tests.
2992
2993         * WebCore.gypi:
2994         * platform/chromium/support/WebSharedGraphicsContext3D.cpp: Removed.
2995
2996 2013-03-06  Dana Jansens  <danakj@chromium.org>
2997
2998         [chromium] Don't get callbacks or create GrContext from unowned WebGraphicsContext3D
2999         https://bugs.webkit.org/show_bug.cgi?id=111638
3000
3001         Reviewed by James Robinson.
3002
3003         If the context is not owned, it's lifetime is not guaranteed, and by the time
3004         the GraphicsContext3D is destroyed, the WGC3D can already be deleted.
3005
3006         When the context is not owned by the GraphicsContext3D, then don't clean it up
3007         in the destructor or set up callbacks, as these are the owner's responsibility.
3008
3009         * platform/chromium/support/GraphicsContext3DPrivate.cpp:
3010         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
3011         (WebCore::GraphicsContext3DPrivate::grContext):
3012         (WebCore::GraphicsContext3DPrivate::setContextLostCallback):
3013         (WebCore::GraphicsContext3DPrivate::setErrorMessageCallback):
3014
3015 2013-02-22  Jer Noble  <jer.noble@apple.com>
3016
3017         Default mouse cursor behavior should be auto-hide for full screen video with custom controls
3018         https://bugs.webkit.org/show_bug.cgi?id=107601
3019
3020         Reviewed by Beth Dakin.
3021
3022         Test: fullscreen/video-cursor-auto-hide.html
3023
3024         To facilitate automatically hiding the mouse cursor after a certain amount of idle mouse
3025         time, add a new CSS property '-webkit-cursor-visibility', and handle that value inside of
3026         EventHandler. When that value is present, the EventHandler will start a timer which, when
3027         fired, will set the view's cursor to the None cursor. Subsequent mouse moves will either
3028         cancel the timer, or reset the auto-hide timer.
3029
3030         Add a new CSS property, '-webkit-cursor-visibility':
3031         * css/CSSComputedStyleDeclaration.cpp:
3032         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3033         * css/CSSParser.cpp:
3034         (WebCore::CSSParser::parseValue):
3035         * css/CSSPrimitiveValueMappings.h:
3036         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3037         (WebCore::CSSPrimitiveValue::operator ECursorVisibility):
3038         * css/CSSProperty.cpp:
3039         (WebCore::CSSProperty::isInheritedProperty):
3040         * css/CSSPropertyNames.in:
3041         * css/CSSValueKeywords.in:
3042         * css/StyleBuilder.cpp:
3043         (WebCore::StyleBuilder::StyleBuilder):
3044         * css/StyleResolver.cpp:
3045         (WebCore::StyleResolver::applyProperty):
3046
3047         Add a rule for video descendants of full screen elements to auto-hide the cursor on hover:
3048         * css/fullscreen.css:
3049         (:-webkit-full-screen video:hover):
3050
3051         Add a new timer, m_autoHideCursorTimer, to control resetting the view's cursor to None after
3052         enough mouse idle time has passed.
3053         * page/EventHandler.cpp:
3054         (WebCore::EventHandler::EventHandler):
3055         (WebCore::EventHandler::~EventHandler):
3056         (WebCore::EventHandler::clear):
3057         (WebCore::EventHandler::selectCursor):
3058         (WebCore::EventHandler::startAutoHideCursorTimer):
3059         (WebCore::EventHandler::cancelAutoHideCursorTimer):
3060         (WebCore::EventHandler::autoHideCursorTimerFired):
3061         * page/EventHandler.h:
3062
3063         Make FrameView::isActive() a public function (like it is in its superclass).
3064         * page/FrameView.h:
3065         (FrameView):
3066
3067         Move the definition for timeWithoutMouseMovementBeforeHidingControls from page->theme()
3068         to page->settings() and allow that setting to be overridden in InternalSettings for 
3069         testing purposes:
3070         * page/Settings.cpp:
3071         (WebCore::Settings::Settings):
3072         * page/Settings.h:
3073         (WebCore::Settings::setTimeWithoutMouseMovementBeforeHidingControls):
3074         (WebCore::Settings::timeWithoutMouseMovementBeforeHidingControls):
3075         * rendering/RenderTheme.h:
3076         * testing/InternalSettings.cpp:
3077         (WebCore::InternalSettings::Backup::Backup):
3078         (WebCore::InternalSettings::Backup::restoreTo):
3079         (WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls):
3080         * testing/InternalSettings.h:
3081         (InternalSettings):
3082         * testing/InternalSettings.idl:
3083         * html/shadow/MediaControls.cpp:
3084         (WebCore::MediaControls::startHideFullscreenControlsTimer):
3085
3086         Add support to FeatureObserver for CURSOR_VISIBILITY:
3087         * page/FeatureObserver.h:
3088
3089         Enable the feature flag:
3090         * Configurations/FeatureDefines.xcconfig:
3091
3092 2013-03-06  Jer Noble  <jer.noble@apple.com>
3093
3094         Full screen from an iframe with a z-index style will allow siblings with higher z-index to overlay full screen content.
3095         https://bugs.webkit.org/show_bug.cgi?id=111637
3096
3097         Reviewed by Simon Fraser.
3098
3099         No new tests; updated fullscreen/full-screen-iframe-zIndex.html to expose bug.
3100
3101         Pages with explicit z-index: styles on their iframes will override the default z-index: UA style when
3102         elements within that iframe enter full screen mode. Mark the UA style as !important so as to not allow
3103         iframe siblings with higher z-index styles to overlay the full screen element.
3104
3105         * css/fullscreen.css:
3106         (:-webkit-full-screen):
3107
3108 2013-03-06  Levi Weintraub  <leviw@chromium.org>
3109
3110         InsertUnorderedList can lead to lost content and assertions in moveParagraphs
3111         https://bugs.webkit.org/show_bug.cgi?id=111228
3112
3113         Reviewed by Ryosuke Niwa.
3114
3115         When a list is wrapped in a presentational inline like a b tag, we'd create markup that included
3116         everything up to the b tag from moveParagraphs when intending to only move the contents of the
3117         list item. This could make it impossible to remove content from a list and trigger loss of
3118         editable text.
3119
3120         Test: editing/execCommand/insert-remove-block-list-inside-presentational-inline.html
3121
3122         * editing/EditingStyle.cpp:
3123         (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Ensure there's an inline style
3124         before calling propertyExistsInStyle.
3125         (WebCore::HTMLElementEquivalent::propertyExistsInStyle): Removing null check for style.
3126         All callers ensure this value isn't null.
3127         * editing/markup.cpp:
3128         (WebCore::highestAncestorToWrapMarkup): Avoid going over RenderBlocks when finding the highest
3129         presentational ancestor to avoid leaving the bounds of the original paragraph.
3130
3131 2013-03-06  Adam Klein  <adamk@chromium.org>
3132
3133         [V8] Use implicit references instead of object groups to keep registered MutationObservers alive
3134         https://bugs.webkit.org/show_bug.cgi?id=111382
3135
3136         Reviewed by Adam Barth.
3137
3138         Two-phase approach to implicit references: after grouping objects
3139         together, add an implicit reference between each registered node's
3140         group and the MutationObserver's group (which includes wrappers from
3141         all worlds).
3142
3143         Also changed many uses of v8::Value to v8::Object where we know we're
3144         dealing with Object and the V8 API expects them.
3145
3146         Test: ManualTests/mutation-observer-leaks-nodes.html
3147
3148         * bindings/v8/V8GCController.cpp:
3149         (WebCore::ImplicitConnection::ImplicitConnection):
3150         (WebCore::ImplicitConnection::wrapper):
3151         (ImplicitConnection):
3152         (WebCore::ImplicitReference::ImplicitReference): Wrapper class holding a parent who should have an implicit reference to a child.
3153         (ImplicitReference):
3154         (WebCore::operator<): Needed for std::sort() call to avoid the overhead of using a HashMap
3155         (WebCore::WrapperGrouper::addObjectWrapperToGroup):
3156         (WebCore::WrapperGrouper::addNodeWrapperToGroup):
3157         (WebCore::WrapperGrouper::addImplicitReference):
3158         (WrapperGrouper):
3159         (WebCore::WrapperGrouper::apply):
3160
3161 2013-03-06  Ankur Taly  <ataly@google.com>
3162
3163         Modify log method in V8DOMActivityLogger so that the apiName and
3164         extraInfo arguments are of type const String& instead of const char*.
3165         This change gets rid of some of the memory ownership issues that arise
3166         with char* pointers.
3167         https://bugs.webkit.org/show_bug.cgi?id=111483
3168
3169         Reviewed by Adam Barth.
3170
3171         There are no new tests as there is no change in behavior.
3172
3173         * bindings/v8/V8DOMActivityLogger.h:
3174         (WebCore::V8DOMActivityLogger::log):
3175
3176 2013-03-06  Mike Reed  <reed@google.com>
3177
3178         Use SkTypeface API directly, rather than (soon to be private) SkFontHost
3179         https://bugs.webkit.org/show_bug.cgi?id=111588
3180
3181         Reviewed by Stephen White.
3182
3183         No new tests, as existing tests in fast/writing-mode exercise this code.
3184
3185         e.g. japanese-rl-text-with-broken-font.html
3186              vertical-subst-font-vert-no-dflt.html
3187
3188         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
3189         (WebCore::FontPlatformData::emSizeInFontUnits):
3190         (WebCore::FontPlatformData::openTypeTable):
3191         * platform/graphics/harfbuzz/HarfBuzzFaceSkia.cpp:
3192         (WebCore::harfBuzzSkiaGetTable):
3193         (WebCore::HarfBuzzFace::createFace):
3194         * platform/graphics/skia/SimpleFontDataSkia.cpp:
3195         (WebCore::SimpleFontData::platformInit):
3196
3197 2013-03-06  Victor Costan <costan@gmail.com>
3198
3199         Cleanup in multipart FormData sending code.
3200         https://bugs.webkit.org/show_bug.cgi?id=111603
3201
3202         Reviewed by Alexey Proskuryakov.
3203
3204         No new tests. This is cleanup.
3205
3206         * platform/network/FormDataBuilder.cpp:
3207         (WebCore::appendQuotedString): use proper types (e.g, size_t instead of
3208         unsigned long)
3209
3210 2013-03-06  Tony Gentilcore  <tonyg@chromium.org>
3211
3212         Threaded HTML parser should use 8 bit strings for attributes
3213         https://bugs.webkit.org/show_bug.cgi?id=111610
3214
3215         Reviewed by Eric Seidel.
3216
3217         This fixes a 27% regression in dromaeo_jslibattrjquery on the threaded HTML parser vs. the main thread parser.
3218
3219         No new tests because no new functionality.
3220
3221         * html/parser/CompactHTMLToken.cpp:
3222         (WebCore::CompactHTMLToken::CompactHTMLToken):
3223
3224 2013-03-06  Alpha Lam  <hclam@chromium.org>
3225
3226         More cleanup in GIFImageReader
3227         https://bugs.webkit.org/show_bug.cgi?id=111137
3228
3229         Reviewed by Stephen White.
3230
3231         Refactor GIFImageReaderReader with the following changes:
3232         + Separate GIFLZWContext for decoding states.
3233         + Replace unsigned char* with Vector<unsigned char>
3234
3235         There is no change in code behavior and just refactoring.
3236
3237         No new tests. This is covered by existing GIFImageReaderTest.
3238         I also did a local testing on a 50k image corpus and showed no regression.
3239
3240         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3241         (WebCore::GIFImageDecoder::haveDecodedRow):
3242         * platform/image-decoders/gif/GIFImageDecoder.h:
3243         (GIFImageDecoder):
3244         * platform/image-decoders/gif/GIFImageReader.cpp:
3245         (GIFImageReader::outputRow):
3246         (GIFImageReader::doLZW):
3247         (GIFImageReader::decodeInternal):
3248         (GIFImageReader::prepareLZWContext):
3249         * platform/image-decoders/gif/GIFImageReader.h:
3250         (GIFFrameContext):
3251         (GIFFrameContext::GIFFrameContext):
3252         (GIFFrameContext::~GIFFrameContext):
3253         (GIFLZWContext):
3254         (GIFLZWContext::GIFLZWContext):
3255         (GIFImageReader):
3256
3257 2013-03-06  Tim Horton  <timothy_horton@apple.com>
3258
3259         Fix typo'd MainThreadScrollingBecauseOfStyleIndictaion
3260         https://bugs.webkit.org/show_bug.cgi?id=111557
3261
3262         Reviewed by Geoff Garen.
3263
3264         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3265         (WebCore::ScrollingCoordinatorMac::commitTreeState):
3266         * platform/graphics/TiledBacking.h:
3267         * platform/graphics/ca/mac/TileCache.mm:
3268         (WebCore::TileCache::updateTileCoverageMap):
3269
3270 2013-03-05  Geoffrey Garen  <ggaren@apple.com>
3271
3272         Removed some dead code in the page cache
3273         https://bugs.webkit.org/show_bug.cgi?id=111525
3274
3275         Reviewed by Alexey Proskuryakov.
3276
3277         Page cache autorelease doesn't exist anymore, so there's no need to keep
3278         around these olds hacks.
3279
3280         * WebCore.exp.in:
3281         * history/PageCache.cpp:
3282         (WebCore::PageCache::PageCache):
3283         (WebCore):
3284         * history/PageCache.h:
3285         (PageCache):
3286         * page/Settings.cpp:
3287         (WebCore::Settings::setUsesPageCache):
3288         * platform/mac/MemoryPressureHandlerMac.mm:
3289         (WebCore::MemoryPressureHandler::releaseMemory):
3290         * platform/qt/QtTestSupport.cpp:
3291         (WebKit::QtTestSupport::clearMemoryCaches):
3292
3293 2013-03-06  Rafael Weinstein  <rafaelw@chromium.org>
3294
3295         Unreviewed, rolling out r144924.
3296         http://trac.webkit.org/changeset/144924
3297         https://bugs.webkit.org/show_bug.cgi?id=109908
3298
3299         caused multiple crashes in inspector/debugger tests
3300
3301         * bindings/js/JSInjectedScriptHostCustom.cpp:
3302         * bindings/js/ScriptObject.h:
3303         * bindings/v8/ScriptObject.h:
3304         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
3305         * inspector/InjectedScriptHost.cpp:
3306         (WebCore::InjectedScriptHost::create):
3307         (WebCore::InjectedScriptHost::InjectedScriptHost):
3308         (WebCore::InjectedScriptHost::disconnect):
3309         * inspector/InjectedScriptHost.h:
3310         (WebCore):
3311         (InjectedScriptHost):
3312         * inspector/InjectedScriptHost.idl:
3313         * inspector/InjectedScriptManager.cpp:
3314         (WebCore::InjectedScriptManager::InjectedScriptManager):
3315         (WebCore::InjectedScriptManager::discardInjectedScripts):
3316         (WebCore::InjectedScriptManager::discardInjectedScriptsFor):
3317         * inspector/InjectedScriptManager.h:
3318         (InjectedScriptManager):
3319         * inspector/InjectedScriptSource.js:
3320         (.):
3321
3322 2013-03-06  Dmitry Zvorygin  <zvorygin@chromium.org>
3323
3324         Introduce new message sources for logging.
3325         https://bugs.webkit.org/show_bug.cgi?id=110968
3326
3327         Reviewed by Pavel Feldman.
3328
3329         Added SecurityMessageSource, RenderingMessageSource, StorageMessageSource, AppCacheMessageSource, CSSMessageSource.
3330         Changed some logging lines to contain more descriptive message source.
3331
3332         * Modules/webdatabase/DatabaseBase.cpp:
3333         (WebCore::DatabaseBase::logErrorMessage):
3334         * Modules/webdatabase/DatabaseManager.cpp:
3335         (WebCore::DatabaseManager::logErrorMessage):
3336         * Modules/websockets/WebSocketChannel.cpp:
3337         (WebCore::WebSocketChannel::fail):
3338         * bindings/ScriptControllerBase.cpp:
3339         (WebCore::ScriptController::canExecuteScripts):
3340         * css/MediaList.cpp:
3341         (WebCore::addResolutionWarningMessageToConsole):
3342         * dom/Document.cpp:
3343         (WebCore::Document::processHttpEquiv):
3344         * dom/ScriptElement.cpp:
3345         (WebCore::ScriptElement::executeScript):
3346         (WebCore::ScriptElement::notifyFinished):
3347         * dom/ViewportArguments.cpp:
3348         (WebCore::reportViewportWarning):
3349         * html/HTMLFormControlElement.cpp:
3350         (WebCore::shouldAutofocus):
3351         * html/HTMLFormElement.cpp:
3352         (WebCore::HTMLFormElement::validateInteractively):
3353         * html/HTMLIFrameElement.cpp:
3354         (WebCore::HTMLIFrameElement::parseAttribute):
3355         * html/canvas/CanvasRenderingContext2D.cpp:
3356         (WebCore::CanvasRenderingContext2D::getImageData):
3357         * html/canvas/WebGLRenderingContext.cpp:
3358         (WebCore):
3359         (WebCore::WebGLRenderingContext::printWarningToConsole):
3360         * html/parser/XSSAuditor.cpp:
3361         (WebCore::XSSAuditor::init):
3362         * html/parser/XSSAuditorDelegate.cpp:
3363         (WebCore::XSSAuditorDelegate::didBlockScript):
3364         * inspector/ConsoleMessage.cpp:
3365         (WebCore::messageSourceValue):
3366         * inspector/Inspector.json:
3367         * loader/FrameLoader.cpp:
3368         (WebCore::FrameLoader::submitForm):
3369         (WebCore::FrameLoader::reportLocalLoadFailed):
3370         (WebCore::createWindow):
3371         * loader/ImageLoader.cpp:
3372         (WebCore::ImageLoader::notifyFinished):
3373         * loader/MainResourceLoader.cpp:
3374         (WebCore::MainResourceLoader::responseReceived):
3375         * loader/MixedContentChecker.cpp:
3376         (WebCore::MixedContentChecker::logWarning):
3377         * loader/TextTrackLoader.cpp:
3378         (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
3379         * loader/appcache/ApplicationCacheGroup.cpp:
3380         (WebCore::ApplicationCacheGroup::abort):
3381         * loader/cache/CachedResourceLoader.cpp:
3382         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
3383         * page/Console.cpp:
3384         (WebCore::printMessageSourceAndLevelPrefix):
3385         * page/ConsoleTypes.h:
3386         * page/ContentSecurityPolicy.cpp:
3387         (WebCore::ContentSecurityPolicy::logToConsole):
3388         * page/DOMWindow.cpp:
3389         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
3390         * page/PointerLockController.cpp:
3391         (WebCore::PointerLockController::requestPointerLock):
3392         * svg/SVGDocumentExtensions.cpp:
3393         (WebCore::reportMessage):
3394
3395 2013-03-06  Florin Malita  <fmalita@chromium.org>
3396
3397         SVG pattern to pattern reference does not work if first pattern has a child node
3398         https://bugs.webkit.org/show_bug.cgi?id=111586
3399
3400         Reviewed by Philip Rogers.
3401
3402         SVGPatternElement::collectPatternAttributes should test for child elements, not child nodes.
3403
3404         Tests: svg/custom/pattern-reference-expected.svg
3405                svg/custom/pattern-reference.svg
3406
3407         * svg/SVGPatternElement.cpp:
3408         (WebCore::SVGPatternElement::collectPatternAttributes):
3409
3410 2013-03-06  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3411
3412         [soup] session cookies are not correctly reported in getRawCookies()
3413         https://bugs.webkit.org/show_bug.cgi?id=111584
3414
3415         Reviewed by Martin Robinson.
3416
3417         As per libsoup documentation, SoupCookie->expires is NULL for session cookies.
3418         However, the soup implementation for getRawCookies() does not check for NULL
3419         case before passing the value to soup_date_to_time_t(), which leads to run time
3420         warnings.
3421
3422         We should also pass true for WebCore::Cookie's session argument if
3423         SoupCookie->expires is NULL. The current implementation reports the cookie as a
3424         session one if soup_cookie_jar_is_persistent(jar) returns true, which is
3425         inaccurate.
3426
3427         No new tests, no behavior change for layout tests as Web Inspector currently
3428         ignores the "session" member and uses expires/max-age instead to deduce it.
3429
3430         * platform/network/soup/CookieJarSoup.cpp:
3431         (WebCore::getRawCookies):
3432
3433 2013-03-06  Douglas Stockwell  <dstockwell@chromium.org>
3434
3435         REGRESSION(r111639): delayed animation start can be postponed
3436         https://bugs.webkit.org/show_bug.cgi?id=108582
3437
3438         Query the animation timer directly for the time it will next fire rather than
3439         trying to cache the interval. Previous approach was incorrect -- as time advanced
3440         it was possible for the interval to jump beyond the next service time.
3441
3442         Reviewed by Darin Adler.
3443
3444         Test: animations/animation-delay-changed.html
3445
3446  &nb