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