Extend platform layer so it can pass blend modes to the compositing calls
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-07  Rik Cabanier  <cabanier@adobe.com>
2
3         Extend platform layer so it can pass blend modes to the compositing calls
4         https://bugs.webkit.org/show_bug.cgi?id=104176
5
6         Reviewed by Dirk Schulze.
7
8         Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context 
9
10         No new tests, no new functionality.
11
12         * html/HTMLCanvasElement.cpp:
13         (WebCore::HTMLCanvasElement::paint):
14         * platform/graphics/BitmapImage.h:
15         * platform/graphics/CrossfadeGeneratedImage.cpp:
16         (WebCore::CrossfadeGeneratedImage::draw):
17         * platform/graphics/CrossfadeGeneratedImage.h:
18         (CrossfadeGeneratedImage):
19         * platform/graphics/GeneratedImage.h:
20         (GeneratedImage):
21         * platform/graphics/GeneratorGeneratedImage.cpp:
22         (WebCore::GeneratorGeneratedImage::draw):
23         * platform/graphics/GeneratorGeneratedImage.h:
24         (GeneratorGeneratedImage):
25         * platform/graphics/GraphicsContext.cpp:
26         (WebCore::GraphicsContext::drawImage):
27         (WebCore):
28         (WebCore::GraphicsContext::drawImageBuffer):
29         (WebCore::GraphicsContext::setCompositeOperation):
30         * platform/graphics/GraphicsContext.h:
31         (WebCore::GraphicsContextState::GraphicsContextState):
32         (GraphicsContextState):
33         (GraphicsContext):
34         * platform/graphics/Image.cpp:
35         (WebCore::Image::draw):
36         (WebCore::Image::drawTiled):
37         * platform/graphics/Image.h:
38         (Image):
39         * platform/graphics/ImageBuffer.h:
40         (ImageBuffer):
41         * platform/graphics/cairo/BitmapImageCairo.cpp:
42         (WebCore::BitmapImage::draw):
43         * platform/graphics/cairo/GraphicsContextCairo.cpp:
44         (WebCore::GraphicsContext::setPlatformCompositeOperation):
45         * platform/graphics/cairo/ImageBufferCairo.cpp:
46         (WebCore::ImageBuffer::draw):
47         * platform/graphics/cg/BitmapImageCG.cpp:
48         (WebCore::BitmapImage::draw):
49         * platform/graphics/cg/GraphicsContextCG.cpp:
50         (WebCore::GraphicsContext::drawNativeImage):
51         (WebCore::GraphicsContext::setPlatformCompositeOperation):
52         * platform/graphics/cg/ImageBufferCG.cpp:
53         (WebCore::ImageBuffer::draw):
54         * platform/graphics/cg/PDFDocumentImage.cpp:
55         (WebCore::PDFDocumentImage::draw):
56         * platform/graphics/cg/PDFDocumentImage.h:
57         (PDFDocumentImage):
58         * platform/graphics/qt/GraphicsContextQt.cpp:
59         (WebCore::GraphicsContext::setPlatformCompositeOperation):
60         * platform/graphics/qt/ImageBufferQt.cpp:
61         (WebCore::ImageBuffer::draw):
62         * platform/graphics/qt/ImageQt.cpp:
63         (WebCore::BitmapImage::draw):
64         * platform/graphics/qt/StillImageQt.cpp:
65         (WebCore::StillImage::draw):
66         * platform/graphics/qt/StillImageQt.h:
67         (StillImage):
68         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
69         (BitmapImageSingleFrameSkia):
70         * platform/graphics/skia/GraphicsContextSkia.cpp:
71         (WebCore::GraphicsContext::setPlatformCompositeOperation):
72         * platform/graphics/skia/ImageBufferSkia.cpp:
73         (WebCore::ImageBuffer::draw):
74         * platform/graphics/skia/ImageSkia.cpp:
75         (WebCore::BitmapImage::draw):
76         (WebCore::BitmapImageSingleFrameSkia::draw):
77         * platform/graphics/win/ImageCGWin.cpp:
78         (WebCore::BitmapImage::getHBITMAPOfSize):
79         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
80         * svg/graphics/SVGImage.cpp:
81         (WebCore::SVGImage::drawSVGToImageBuffer):
82         (WebCore::SVGImage::draw):
83         (WebCore::SVGImage::nativeImageForCurrentFrame):
84         * svg/graphics/SVGImage.h:
85         (SVGImage):
86
87 2012-12-07  Alpha Lam  <hclam@chromium.org>
88
89         [chromium] ImageDecodingStore should cache partially decoded images
90         https://bugs.webkit.org/show_bug.cgi?id=103796
91
92         Reviewed by Stephen White.
93
94         Implement caching for incomplete images, meaning the image is partially
95         decoded. The image is cached together with partially decoded ImageDecoder.
96         This allows decoding to resume in a later time.
97
98         Caching logic for incomplete images is implemented in ImageDecodingStore.
99
100         Logic for resuming image decoding is implemented in ImageFrameGenerator.
101
102         ImageDecodingStore allows storing incomplete image with the decoder.
103         The cache entry can be used in a later time to read and write (i.e. resume
104         decoding.) To avoid the same entry being written and read at the same time,
105         an incomplete entry can be used by one user only. Concurrent access to
106         an incomplete entry should never happen and is checked by an assert.
107         An entry can becomes complete when decoding is finished. In this case
108         the associated decoder is deleted. Once an entry becomes complete concurrent
109         read is allowed.
110
111         ImageFrameGenerator performs the logic to resume image decoding. It
112         performs the following operations in sequence:
113         - Try to lookup a complete image
114         - Try to perform scaling on a complete image
115         - Try to lookup an incomplete image and resume decoding & scaling
116         - Everything fails, start decoding from scratch
117         The entire sequence of operations in under a mutex, hence there will be
118         no more than 1 user of an incomplete cache entry at the same time.
119
120         New unit tests in ImageDecodingStoreTest and ImageFrameGeneratorTest.
121
122         * platform/graphics/chromium/ImageDecodingStore.cpp:
123         (WebCore::ImageDecodingStore::lockCache):
124         Change of method definition to return an image and ImageDecoder.
125         (WebCore::ImageDecodingStore::unlockCache):
126         (WebCore::ImageDecodingStore::insertAndLockCache):
127         (WebCore::ImageDecodingStore::overwriteAndLockCache):
128         New method to allow an incomplete cache entry be overwritten.
129         (WebCore):
130         * platform/graphics/chromium/ImageDecodingStore.h:
131         (ImageDecodingStore):
132         (WebCore::ImageDecodingStore::CacheEntry::createAndUse):
133         (WebCore::ImageDecodingStore::CacheEntry::CacheEntry):
134         (WebCore::ImageDecodingStore::CacheEntry::cachedImage):
135         (WebCore::ImageDecodingStore::CacheEntry::cachedDecoder):
136         (WebCore::ImageDecodingStore::CacheEntry::releaseCachedDecoder):
137         (WebCore::ImageDecodingStore::CacheEntry::overwriteCachedImage):
138         New method to allow an incomplete image be overwitten.
139         (CacheEntry):
140         * platform/graphics/chromium/ImageFrameGenerator.cpp:
141         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
142         (WebCore::ImageFrameGenerator::decodeAndScale):
143         (WebCore::ImageFrameGenerator::tryToLockCompleteCache):
144         (WebCore::ImageFrameGenerator::tryToScale):
145         (WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale):
146         New method to lookup an incomplete cache entry and resume decoding.
147         (WebCore):
148         (WebCore::ImageFrameGenerator::tryToDecodeAndScale):
149         (WebCore::ImageFrameGenerator::decoder):
150         New helper method to do decoding for a full sized image.
151         (WebCore::ImageFrameGenerator::prepareData):
152         New helper method to prepare data safely.
153         * platform/graphics/chromium/ImageFrameGenerator.h:
154         (ImageFrameGenerator):
155         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
156         (WebCore::LazyDecodingPixelRef::onLockPixels):
157         * platform/graphics/chromium/ScaledImageFragment.h:
158         (WebCore::ScaledImageFragment::setIsComplete):
159
160 2012-12-07  Alexis Menard  <alexis@webkit.org>
161
162         Enable CSS3 position offset for CSS Masking.
163         https://bugs.webkit.org/show_bug.cgi?id=104252
164
165         Reviewed by Dirk Schulze.
166
167         To follow CSS3 background-position, mask-position should also support
168         the new <position> type (http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#mask-property).
169         Now the code is shared between background and mask I renamed the
170         functions used to be more generic. Note that the feature flag is not
171         meant to stay and will be removed in a following commit.
172
173         No new tests : I modified LayoutTests/fast/masking/parsing-mask.html to
174         cover the new feature.
175
176         * css/CSSComputedStyleDeclaration.cpp:
177         (WebCore::createPositionListForLayer):
178         * css/CSSParser.cpp:
179         (WebCore::isFillPositionKeyword):
180         (WebCore::CSSParser::parse4ValuesFillPosition):
181         (WebCore::CSSParser::parse3ValuesFillPosition):
182         (WebCore::CSSParser::isPotentialPositionValue):
183         (WebCore::CSSParser::parseFillPosition):
184         (WebCore::CSSParser::parse2ValuesFillPosition):
185         (WebCore::CSSParser::parseFillProperty):
186         (WebCore::CSSParser::parseTransformOriginShorthand):
187         (WebCore::CSSParser::parseRadialGradient):
188         (WebCore::CSSParser::parsePerspectiveOrigin):
189         * css/CSSParser.h:
190         * css/CSSToStyleMap.cpp:
191         (WebCore::CSSToStyleMap::mapFillXPosition):
192         (WebCore::CSSToStyleMap::mapFillYPosition):
193
194 2012-12-07  No'am Rosenthal  <noam@webkit.org>
195
196         Use background color for GraphicsLayers when applicable
197         https://bugs.webkit.org/show_bug.cgi?id=103786
198
199         Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place:
200         1. The layer doesn't paint its own content, other than background/decoration.
201         2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.)
202         3. The image has only a background color, and no background image.
203         4. background-composite is set to source-over, and background-clip is anything apart from text.
204         5. The port supports setContentsToBackgroundColor.
205
206         This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store
207         for that layer, but instead draw that solid color directly.
208         In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of
209         a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's
210         background-clip property.
211
212         Reviewed by Simon Fraser.
213
214         Tests: compositing/background-color/background-color-alpha.html
215                compositing/background-color/background-color-change-to-text.html
216                compositing/background-color/background-color-composite.html
217                compositing/background-color/background-color-container.html
218                compositing/background-color/background-color-content-clip.html
219                compositing/background-color/background-color-padding-change.html
220                compositing/background-color/background-color-padding-clip.html
221                compositing/background-color/background-color-simple.html
222                compositing/background-color/background-color-text-change.html
223                compositing/background-color/background-color-text-clip.html
224
225         * platform/graphics/GraphicsLayer.h:
226         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
227             Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor.
228             Currently only the MAC implementation and TextureMapper falls under that category.
229
230         * rendering/RenderBox.h:
231         (WebCore::RenderBox::paddingBoxRect):
232             Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to 
233             background-clip: padding.
234
235         * rendering/RenderLayerBacking.cpp:
236         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
237             Update the background color if needed, for every configuration change.
238             This should accomodate the old behavior for full-screen, while enabling background color changes for other layers.
239
240         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
241             Move the contentsRect logic to updateContentsRect.
242
243         (WebCore::RenderLayerBacking::updateContentsRect):
244             Use the background box when directly compositing backgrounds.
245
246         (WebCore::RenderLayerBacking::updateBackgroundColor):
247             Set the background color if applicable, otherwise set to trasnparent and clear.
248             This was not needed in the past because background colors were only used for the special case of full-screen.
249
250         (WebCore::supportsDirectBoxDecorationsComposition):
251             Helper function to determine whether a particular background can be directly composited. Right now only 
252             background color can be composited, and only if the GraphicsLayer implementation supports background colors.
253             Also we don't yet support background-clip: text and any background-composite other than source-over.
254
255         (WebCore::RenderLayerBacking::paintsBoxDecorations):
256             Apply the new supportsDirectBoxDecorationsComposition logic.
257
258         (WebCore::RenderLayerBacking::contentsBox):
259             Remove unnecessary local variable.
260
261         (WebCore::backgroundRectForBox):
262         (WebCore::RenderLayerBacking::backgroundBox):
263             Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip.
264             The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as 
265             GraphicsLayer::contentsRect expects snapped pixels.
266
267
268 2012-12-06  Ryosuke Niwa  <rniwa@webkit.org>
269
270         Shrink the size of NodeRareData by moving pointers into separate objects
271         https://bugs.webkit.org/show_bug.cgi?id=104312
272
273         Reviewed by Andreas Kling.
274
275         This patch does three things:
276         1. Move ChildNodeList back into NodeListsNodeData.
277         2. Move m_mutationObserverRegistry & m_transientMutationObserverRegistry into a separate object owned by NodeRareData.
278         3. Move m_itemProp, m_itemRef, m_itemType & into a separate object owned by NodeRareData.
279
280         Moving m_childNodeList from NodeRareData to NodeListsNodeData also has a nice side-effect of making ChildNodeList
281         behave more like other LiveNodeLists.
282
283         This patch also fixes Mac build when microdata is enabled.
284
285         There should be no user-visible behavior change.
286
287         * dom/ChildNodeList.cpp:
288         (WebCore::ChildNodeList::~ChildNodeList):
289         * dom/Node.cpp:
290         (WebCore::Node::childNodes): Moved the code to create ChildNodeList into NodeListsNodeData to match other node lists.
291         (WebCore::Node::invalidateNodeListCachesInAncestors):
292         (WebCore): Removed removeCachedChildNodeList.
293         * dom/Node.h:
294         (Node):
295         * dom/NodeRareData.cpp:
296         (WebCore): Assert the size of NodeRareData at compilation time.
297         (WebCore::NodeListsNodeData::reportMemoryUsage):
298         (WebCore::NodeRareData::reportMemoryUsage):
299         * dom/NodeRareData.h:
300         (WebCore::NodeListsNodeData::clearChildNodeListCache): Moved from NodeRareData.
301         (WebCore::NodeListsNodeData::ensureChildNodeList): Extracted from Node::childNodes.
302         (WebCore::NodeListsNodeData::removeChildNodeList): Added.
303         (WebCore::NodeListsNodeData::NodeListsNodeData): Initialize m_childNodeList.
304         (WebCore::NodeRareData::NodeMutationObserverData): Extracted from NodeRareData.
305         (WebCore::NodeRareData::NodeMutationObserverData::create):
306         (WebCore::NodeRareData::NodeMicroDataTokenLists): Ditto.
307         (WebCore::NodeRareData::NodeMicroDataTokenLists::create):
308         (WebCore::NodeRareData::NodeRareData):
309         (WebCore::NodeRareData::ensureNodeLists): Merged setNodeLists since it's not called elsewhere.
310         (WebCore::NodeRareData::mutationObserverRegistry):
311         (WebCore::NodeRareData::ensureMutationObserverRegistry): Added.
312         (WebCore::NodeRareData::transientMutationObserverRegistry):
313         (WebCore::NodeRareData::ensureTransientMutationObserverRegistry):
314         (WebCore::NodeRareData::ensureMicroDataTokenLists):
315         (NodeRareData):
316         (WebCore::NodeRareData::itemProp):
317         (WebCore::NodeRareData::setItemProp):
318         (WebCore::NodeRareData::itemRef):
319         (WebCore::NodeRareData::setItemRef):
320         (WebCore::NodeRareData::itemType):
321         (WebCore::NodeRareData::setItemType):
322         * html/HTMLPropertiesCollection.cpp:
323         (WebCore::HTMLPropertiesCollection::propertyNodeList): Renamed from namedItem since its return type, PropertyNodeList,
324         is different from that, Node, of LiveNodeList::namedItem. It was shadowing the function name instead of overriding.
325         * html/HTMLPropertiesCollection.h:
326         (HTMLPropertiesCollection):
327         * html/HTMLPropertiesCollection.idl:
328
329 2012-12-07  Sheriff Bot  <webkit.review.bot@gmail.com>
330
331         Unreviewed, rolling out r136993.
332         http://trac.webkit.org/changeset/136993
333         https://bugs.webkit.org/show_bug.cgi?id=104415
334
335         This patch breaks the mac build (Requested by cabanier on
336         #webkit).
337
338         * html/HTMLCanvasElement.cpp:
339         (WebCore::HTMLCanvasElement::paint):
340         * platform/graphics/BitmapImage.h:
341         * platform/graphics/CrossfadeGeneratedImage.cpp:
342         (WebCore::CrossfadeGeneratedImage::draw):
343         * platform/graphics/CrossfadeGeneratedImage.h:
344         (CrossfadeGeneratedImage):
345         * platform/graphics/GeneratedImage.h:
346         (GeneratedImage):
347         * platform/graphics/GeneratorGeneratedImage.cpp:
348         (WebCore::GeneratorGeneratedImage::draw):
349         * platform/graphics/GeneratorGeneratedImage.h:
350         (GeneratorGeneratedImage):
351         * platform/graphics/GraphicsContext.cpp:
352         (WebCore::GraphicsContext::drawImage):
353         (WebCore::GraphicsContext::drawImageBuffer):
354         (WebCore::GraphicsContext::setCompositeOperation):
355         * platform/graphics/GraphicsContext.h:
356         (WebCore::GraphicsContextState::GraphicsContextState):
357         (GraphicsContextState):
358         (GraphicsContext):
359         * platform/graphics/Image.cpp:
360         (WebCore::Image::draw):
361         (WebCore::Image::drawTiled):
362         * platform/graphics/Image.h:
363         (Image):
364         * platform/graphics/ImageBuffer.h:
365         (ImageBuffer):
366         * platform/graphics/cairo/BitmapImageCairo.cpp:
367         (WebCore::BitmapImage::draw):
368         * platform/graphics/cairo/GraphicsContextCairo.cpp:
369         (WebCore::GraphicsContext::setPlatformCompositeOperation):
370         * platform/graphics/cairo/ImageBufferCairo.cpp:
371         (WebCore::ImageBuffer::draw):
372         * platform/graphics/cg/BitmapImageCG.cpp:
373         (WebCore::BitmapImage::draw):
374         * platform/graphics/cg/GraphicsContextCG.cpp:
375         (WebCore::GraphicsContext::drawNativeImage):
376         (WebCore::GraphicsContext::setPlatformCompositeOperation):
377         * platform/graphics/cg/ImageBufferCG.cpp:
378         (WebCore::ImageBuffer::draw):
379         * platform/graphics/cg/PDFDocumentImage.cpp:
380         (WebCore::PDFDocumentImage::draw):
381         * platform/graphics/cg/PDFDocumentImage.h:
382         (PDFDocumentImage):
383         * platform/graphics/qt/GraphicsContextQt.cpp:
384         (WebCore::GraphicsContext::setPlatformCompositeOperation):
385         * platform/graphics/qt/ImageBufferQt.cpp:
386         (WebCore::ImageBuffer::draw):
387         * platform/graphics/qt/ImageQt.cpp:
388         (WebCore::BitmapImage::draw):
389         * platform/graphics/qt/StillImageQt.cpp:
390         (WebCore::StillImage::draw):
391         * platform/graphics/qt/StillImageQt.h:
392         (StillImage):
393         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
394         (BitmapImageSingleFrameSkia):
395         * platform/graphics/skia/GraphicsContextSkia.cpp:
396         (WebCore::GraphicsContext::setPlatformCompositeOperation):
397         * platform/graphics/skia/ImageBufferSkia.cpp:
398         (WebCore::ImageBuffer::draw):
399         * platform/graphics/skia/ImageSkia.cpp:
400         (WebCore::BitmapImage::draw):
401         (WebCore::BitmapImageSingleFrameSkia::draw):
402         * platform/graphics/win/ImageCGWin.cpp:
403         (WebCore::BitmapImage::getHBITMAPOfSize):
404         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
405         * svg/graphics/SVGImage.cpp:
406         (WebCore::SVGImage::drawSVGToImageBuffer):
407         (WebCore::SVGImage::draw):
408         (WebCore::SVGImage::nativeImageForCurrentFrame):
409         * svg/graphics/SVGImage.h:
410         (SVGImage):
411
412 2012-12-07  Alexey Proskuryakov  <ap@apple.com>
413
414         There is no need to change cached resource storage policy through ResourceHandleClient
415         https://bugs.webkit.org/show_bug.cgi?id=104413
416
417         Reviewed by Brady Eidson.
418
419         This code was only needed to prevent storing responses to disk in private browsing
420         mode, but we now have a storage session to take care of that in a cleaner and more
421         reliable way.
422
423         * loader/ResourceLoader.cpp:
424         * loader/ResourceLoader.h: (WebCore::ResourceLoader::receivedCancellation):
425         * platform/network/ResourceHandleClient.h:
426         * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willCacheResponse):
427         * platform/network/mac/ResourceHandleMac.mm:
428         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
429
430 2012-12-07  Adam Klein  <adamk@chromium.org>
431
432         MutationRecord addedNodes/removedNodes should never be null
433         https://bugs.webkit.org/show_bug.cgi?id=98921
434
435         Reviewed by Ryosuke Niwa.
436
437         Per an update to the DOM4 spec that matches Gecko's behavior,
438         addedNodes/removedNodes should be empty NodeLists on 'attributes'
439         and 'characterData' records, rather than null.
440
441         This is accomplished with lazy initialization of addedNodes/removedNodes
442         attributes on 'attributes'/'characterData' records and the
443         addition of a new StaticNodeList::createEmpty() factory method.
444
445         * dom/MutationRecord.cpp:
446         * dom/MutationRecord.h:
447         (MutationRecord):
448         * dom/StaticNodeList.h:
449         (WebCore::StaticNodeList::adopt):
450         (StaticNodeList):
451         (WebCore::StaticNodeList::createEmpty):
452         (WebCore::StaticNodeList::StaticNodeList):
453
454 2012-12-07  Brent Fulgham  <bfulgham@webkit.org>
455
456         Unreviewed build correction after 136959.
457
458         The initialization list should follow the same compiler macro
459         exclusions as the class members.
460
461         * inspector/InstrumentingAgents.h: Add USE(ACCELERATED_COMPOSITING)
462           guards around m_inspectorLayerTreeAgent as this does not exist
463           when the guard is false.
464
465 2012-12-07  Rik Cabanier  <cabanier@adobe.com>
466
467         Extend platform layer so it can pass blend modes to the compositing calls
468         https://bugs.webkit.org/show_bug.cgi?id=104176
469
470         Reviewed by Dirk Schulze.
471
472         Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context 
473
474         No new tests, no new functionality.
475
476         * html/HTMLCanvasElement.cpp:
477         (WebCore::HTMLCanvasElement::paint):
478         * platform/graphics/BitmapImage.h:
479         * platform/graphics/CrossfadeGeneratedImage.cpp:
480         (WebCore::CrossfadeGeneratedImage::draw):
481         * platform/graphics/CrossfadeGeneratedImage.h:
482         (CrossfadeGeneratedImage):
483         * platform/graphics/GeneratedImage.h:
484         (GeneratedImage):
485         * platform/graphics/GeneratorGeneratedImage.cpp:
486         (WebCore::GeneratorGeneratedImage::draw):
487         * platform/graphics/GeneratorGeneratedImage.h:
488         (GeneratorGeneratedImage):
489         * platform/graphics/GraphicsContext.cpp:
490         (WebCore::GraphicsContext::drawImage):
491         (WebCore):
492         (WebCore::GraphicsContext::drawImageBuffer):
493         (WebCore::GraphicsContext::setCompositeOperation):
494         * platform/graphics/GraphicsContext.h:
495         (WebCore::GraphicsContextState::GraphicsContextState):
496         (GraphicsContextState):
497         (GraphicsContext):
498         * platform/graphics/Image.cpp:
499         (WebCore::Image::draw):
500         (WebCore::Image::drawTiled):
501         * platform/graphics/Image.h:
502         (Image):
503         * platform/graphics/ImageBuffer.h:
504         (ImageBuffer):
505         * platform/graphics/cairo/BitmapImageCairo.cpp:
506         (WebCore::BitmapImage::draw):
507         * platform/graphics/cairo/GraphicsContextCairo.cpp:
508         (WebCore::GraphicsContext::setPlatformCompositeOperation):
509         * platform/graphics/cairo/ImageBufferCairo.cpp:
510         (WebCore::ImageBuffer::draw):
511         * platform/graphics/cg/BitmapImageCG.cpp:
512         (WebCore::BitmapImage::draw):
513         * platform/graphics/cg/GraphicsContextCG.cpp:
514         (WebCore::GraphicsContext::drawNativeImage):
515         (WebCore::GraphicsContext::setPlatformCompositeOperation):
516         * platform/graphics/cg/ImageBufferCG.cpp:
517         (WebCore::ImageBuffer::draw):
518         * platform/graphics/cg/PDFDocumentImage.cpp:
519         (WebCore::PDFDocumentImage::draw):
520         * platform/graphics/cg/PDFDocumentImage.h:
521         (PDFDocumentImage):
522         * platform/graphics/qt/GraphicsContextQt.cpp:
523         (WebCore::GraphicsContext::setPlatformCompositeOperation):
524         * platform/graphics/qt/ImageBufferQt.cpp:
525         (WebCore::ImageBuffer::draw):
526         * platform/graphics/qt/ImageQt.cpp:
527         (WebCore::BitmapImage::draw):
528         * platform/graphics/qt/StillImageQt.cpp:
529         (WebCore::StillImage::draw):
530         * platform/graphics/qt/StillImageQt.h:
531         (StillImage):
532         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
533         (BitmapImageSingleFrameSkia):
534         * platform/graphics/skia/GraphicsContextSkia.cpp:
535         (WebCore::GraphicsContext::setPlatformCompositeOperation):
536         * platform/graphics/skia/ImageBufferSkia.cpp:
537         (WebCore::ImageBuffer::draw):
538         * platform/graphics/skia/ImageSkia.cpp:
539         (WebCore::BitmapImage::draw):
540         (WebCore::BitmapImageSingleFrameSkia::draw):
541         * platform/graphics/win/ImageCGWin.cpp:
542         (WebCore::BitmapImage::getHBITMAPOfSize):
543         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
544         * svg/graphics/SVGImage.cpp:
545         (WebCore::SVGImage::drawSVGToImageBuffer):
546         (WebCore::SVGImage::draw):
547         (WebCore::SVGImage::nativeImageForCurrentFrame):
548         * svg/graphics/SVGImage.h:
549         (SVGImage):
550
551 2012-12-07  Alec Flett  <alecflett@chromium.org>
552
553         IndexedDB: propagate transaction_ids through open/upgradeneeded
554         https://bugs.webkit.org/show_bug.cgi?id=103922
555
556         Reviewed by Tony Chang.
557
558         Make sure front-end is always generating the transaction id,
559         so that it can be relied upon as an alternative to the
560         to-be-deprecated IDBTransactionBackendInterface pointer.
561
562         No new tests, this is one stage in a larger refactor.
563
564         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
565         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
566         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
567         (IDBDatabaseBackendImpl::VersionChangeOperation):
568         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
569         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::transactionId):
570         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
571         (IDBDatabaseBackendImpl::PendingOpenCall):
572         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create):
573         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::transactionId):
574         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall):
575         (IDBDatabaseBackendImpl::PendingOpenWithVersionCall):
576         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
577         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
578         (WebCore::IDBDatabaseBackendImpl::createTransaction):
579         (WebCore::IDBDatabaseBackendImpl::openConnection):
580         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
581         (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
582         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
583         (IDBDatabaseBackendImpl):
584         * Modules/indexeddb/IDBFactory.cpp:
585         (WebCore::IDBFactory::openInternal):
586         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
587         (WebCore::IDBFactoryBackendImpl::open):
588
589 2012-12-07  Dima Gorbik  <dgorbik@apple.com>
590
591         Implement general ::cue pseudo element for the <video>
592         https://bugs.webkit.org/show_bug.cgi?id=104043
593
594         Reviewed by Eric Carlson.
595
596         Implemented the ::cue pseudo element to be able to style all WebVTT cues.
597         Added the subcontainer with a '::cue' pseudoId in between the TextTrackContainerElement and WebVTT nodes to separate
598         user agent default styles from user defined styles for the cue elements.
599
600         Test: media/track/track-css-all-cues.html
601
602         * css/CSSSelector.cpp: ::cue pseudo selector doesn't have a valid prefix but should be allowed in the user-agent stylesheet.
603         (WebCore::CSSSelector::parsePseudoType):
604         * html/shadow/MediaControlElements.cpp:
605         (WebCore):
606         (WebCore::MediaControlTextTrackContainerElement::createSubtrees): create a subcontainer and set its pseudoId to '::cue'.
607         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): append WebVTT nodes to the newly created subcontainer.
608         * html/shadow/MediaControlElements.h:
609         (MediaControlTextTrackContainerElement):
610         * html/shadow/MediaControls.cpp:
611         (WebCore::MediaControls::createTextTrackDisplay): initiate creating subtrees for the MediaControlTextTrackContainerElement.
612         * html/shadow/MediaControlsChromium.cpp:
613         (WebCore::MediaControlsChromium::createTextTrackDisplay):
614
615 2012-12-06  Geoffrey Garen  <ggaren@apple.com>
616
617         Crash in JSC::Bindings::RootObject::globalObject() sync'ing notes in Evernote
618         https://bugs.webkit.org/show_bug.cgi?id=104321
619         <rdar://problem/12770497>
620
621         Reviewed by Sam Weinig.
622
623         Missed a null check.
624
625         * bindings/objc/WebScriptObject.mm:
626         (-[WebScriptObject JSObject]): If our root object has been cleared, don't
627         try to dereference it. This happens in Evernote during tear-down.
628
629         This matches the behavior of other methods in the same class.
630
631         (_isSafeScript returns false if the root object has been cleared.)
632
633         If we believe _isSafeScript is a good idea, it's probably the right test
634         to use here (as opposed to just null-checking _rootObject) because this API
635         gives the client unlimited access to the underlying JavaScript object.
636
637 2012-12-07  Stephen Chenney  <schenney@chromium.org>
638
639         XMLSerializer is too aggressive in adding prefixes
640         https://bugs.webkit.org/show_bug.cgi?id=104387
641
642         Reviewed by Ryosuke Niwa.
643
644         We have been adding "xlink:" and "xmlns:" and "xml:" prefixes to any
645         attribute that is in one of those namespaces but which did not already
646         have the matching prefix. This appears to be in error, at least
647         compared to other browsers.
648
649         The correct behavior appears to be to add the prefix only if there is
650         no existing prefix. If there is an existing prefix, we now leave it alone.
651
652         No new tests. Existing test expanded.
653
654         * editing/MarkupAccumulator.cpp:
655         (WebCore::MarkupAccumulator::appendAttribute): Only replace the prefix
656         attribute name prefix if it is empty, and in one of the recognised
657         namespaces.
658
659 2012-12-07  Jon Lee  <jonlee@apple.com>
660
661         Display the auto-start label image after a delay
662         https://bugs.webkit.org/show_bug.cgi?id=104173
663         <rdar://problem/12820071>
664
665         Reviewed by Dan Bernstein.
666
667         Treat the button now as a label. Once the user has hovered over the plug-in, wait a little while before showing the label.
668
669         * rendering/RenderSnapshottedPlugIn.h:
670         (RenderSnapshottedPlugIn): Add a one-shot timer, and a variable representing whether the label should
671         be drawn. Remove the variable that determines whether the label is active.
672
673         * rendering/RenderSnapshottedPlugIn.cpp:
674         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): Set the time to a delay of 1 second.
675         (WebCore::RenderSnapshottedPlugIn::paintReplaced): Paint the label only when we should.
676         (WebCore::RenderSnapshottedPlugIn::paintLabel): The label should only paint in its hovered state.
677         (WebCore::startLabelImage): Renamed.
678         (WebCore::RenderSnapshottedPlugIn::repaintLabel): Renamed.
679         (WebCore::RenderSnapshottedPlugIn::hoverDelayTimerFired): Now that the timer has fired, we should paint
680         the label. Repaint.
681         (WebCore::RenderSnapshottedPlugIn::handleEvent): Update event handling. Click event handler is the
682         same, except we move the label check inside so that if the click is not the left label we don't
683         fall through to the other irrevelant if clauses.
684             For the mouse down handler, make sure to check for the left label. If the hover timer is still running,
685         stop it, so that we don't draw a label while the user is in the middle of a mouse gesture.
686             Redo mouse over and out. On mouse over we start the delay timer. On mouse out we stop the delay timer
687         if it is still running, reset state, and paint the label out.
688         (WebCore::RenderSnapshottedPlugIn::layout): Refactor.
689
690         * Resources/startButtonPressed.png: Removed.
691         * Resources/startButtonPressed@2x.png: Removed.
692         * WebCore.xcodeproj/project.pbxproj:
693
694 2012-12-07  Scott Violet  <sky@chromium.org>
695
696         [chromium] Remove linux theme related files and switch to default
697         https://bugs.webkit.org/show_bug.cgi?id=103897
698
699         Reviewed by Dimitri Glazkov.
700
701         Linux related theme files are now named Default.
702
703         No new tests, code cleanup.
704
705         * WebCore.gyp/WebCore.gyp: Update files
706         * WebCore.gypi: Update files
707         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
708         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
709         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
710         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
711         * rendering/RenderThemeChromiumAndroid.cpp:
712         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet): Linux->Default
713         * rendering/RenderThemeChromiumAndroid.h: Change superclass
714         * rendering/RenderThemeChromiumLinux.cpp: Removed.
715         * rendering/RenderThemeChromiumLinux.h: Removed.
716
717 2012-12-07  Eric Carlson  <eric.carlson@apple.com>
718
719         Captions menu doesn't update to track changes
720         https://bugs.webkit.org/show_bug.cgi?id=104393
721
722         Reviewed by Dean Jackson.
723
724         Flag the captions menu as needing an update when tracks are added or removed. Don't actually
725         change the menu until it needs to be displayed.
726
727         No new tests, media/video-controls-captions-trackmenu.html was updated to test this.
728
729         * html/HTMLMediaElement.cpp:
730         (WebCore::HTMLMediaElement::addTextTrack): Call closedCaptionTracksChanged().
731         (WebCore::HTMLMediaElement::didRemoveTrack): Ditto.
732         (WebCore::HTMLMediaElement::configureTextTracks): Ditto.
733
734         * html/shadow/MediaControlElements.cpp:
735         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement):
736             Intialize m_trackListHasChanged.
737         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Call rebuildTrackListMenu if
738             the track list has changed.
739         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Renamed from resetTrackListMenu.
740         * html/shadow/MediaControlElements.h:
741         (WebCore::MediaControlClosedCaptionsTrackListElement::resetTrackListMenu): Just set m_trackListHasChanged.
742
743         * html/shadow/MediaControls.h:
744         (WebCore::MediaControls::closedCaptionTracksChanged): New, do nothing for base class.
745
746         * html/shadow/MediaControlsApple.cpp:
747         (WebCore::MediaControlsApple::toggleClosedCaptionTrackList): Update the track list before 
748             showing it.
749         (WebCore::MediaControlsApple::closedCaptionTracksChanged):
750         * html/shadow/MediaControlsApple.h:
751
752 2012-12-07  Stephen White  <senorblanco@chromium.org>
753
754         CSS url() filters with forward references don't work
755         https://bugs.webkit.org/show_bug.cgi?id=90405
756
757         Based on a patch by Keyar Hood.
758
759         Reviewed by Dirk Schulze.
760
761         In order for CSS to reference SVG filters that will occur later in
762         the document, or will be added at a future time, we need a way to
763         notify the target element (the one the filter style is applied to)
764         when the correct SVG filter is added to the DOM.
765         There is already code for SVG elements that handles this problem, in
766         SVGResourcesCache. This patch allows any element to have a reference to
767         an SVG element in SVGResourceCache.
768
769         Tests: css3/filters/effect-reference-after.html
770                css3/filters/effect-reference-delete-crash.html
771                css3/filters/effect-reference-delete.html
772                css3/filters/effect-reference-rename.html
773                css3/filters/effect-reference-reset-style-delete-crash.html
774                svg/filters/filter-cycle.html
775
776         * dom/Element.cpp:
777         (WebCore::Element::hasPendingResources): Added
778         (WebCore::Element::setHasPendingResources): Added
779         (WebCore::Element::clearHasPendingResources): Added
780         * dom/Element.h:
781         Accessors for ElementRareData's new bit flag.
782         (WebCore::Element::buildPendingResource):
783         Virtual function to override for referenced elements (moved from SVGElement).
784         * dom/ElementRareData.h:
785         (WebCore::ElementRareData::ElementRareData):
786         Add a new bit flag to indicate whether the element depends on pending resources or not.
787         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
788         (WebCore::BitmapTextureImageBuffer::applyFilters):
789         Changed to the new function signature for FilterEffectRenderer::build().
790         * rendering/FilterEffectRenderer.cpp:
791         (WebCore::FilterEffectRenderer::buildReferenceFilter):
792         Changed signature to accept a RenderObject rather than a Document, so we know which node to notify when the SVG filter arrives.  If the referenced filter cannot be found, add its id as a pending reference.
793         (WebCore::FilterEffectRenderer::build):
794         Changed signature to accept a RenderObject rather than a Document, so we know which node to notify when the SVG filter arrives.
795         * rendering/FilterEffectRenderer.h:
796         Change to signatures of build() and buildReferenceFilter() to pass
797         a RenderObject instead of a Document.
798         * rendering/RenderLayer.cpp:
799         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
800         Use the new semantics for FilterEffectRenderer::build().
801         * rendering/RenderObject.cpp:
802         (WebCore::RenderObject::willBeDestroyed):
803         Notify the cache if a RenderObject is destroyed.
804         * rendering/svg/RenderSVGResourceContainer.cpp:
805         (WebCore::RenderSVGResourceContainer::registerResource):
806         Call clearHasPendingResourceIfPossible on the SVGDocumentExtensions, not
807         on the element, since we want to support generic Elements.
808         * rendering/svg/SVGResources.cpp:
809         (WebCore::SVGResources::buildCachedResources):
810         Add support for building filters on non-SVG elements.
811         * rendering/svg/SVGResourcesCache.cpp:
812         (WebCore::SVGResourcesCache::addResourcesFromRenderObject):
813         Do cycle detection only on SVG elements.
814         (WebCore::SVGResourcesCache::clientStyleChanged):
815         For non-SVG elements, set a synthetic style change when parent resources
816         are invalidated.
817         (WebCore::SVGResourcesCache::resourceDestroyed):
818         Add support for non-SVG Elements.
819         * svg/SVGDocumentExtensions.cpp:
820         (WebCore::SVGDocumentExtensions::addPendingResource):
821         (WebCore::SVGDocumentExtensions::isElementPendingResources):
822         (WebCore::SVGDocumentExtensions::isElementPendingResource):
823         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
824         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
825         Changed to allow use of Element instead of SVGElement.
826         (WebCore::SVGDocumentExtensions::clearHasPendingResourcesIfPossible):
827         Moved from SVGElement, and made to work on any Element.  This way,
828         we avoid adding this function to Element itself.
829         * svg/SVGDocumentExtensions.h:
830         SVGElement -> Element.
831         * svg/SVGElement.cpp:
832         * svg/SVGElement.h:
833         All functions moved to Element, except for clearHasPendingResourcesIfPossible() moved to SVGDocumentExtensions.
834         * svg/SVGElementRareData.h:
835         (WebCore::SVGElementRareData::SVGElementRareData):
836         m_hasPendingResources add accessors moved to ElementRareData.
837         * svg/SVGStyledElement.cpp:
838         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
839         SVGElement -> Element, and call SVGDocumentExtensions for
840         clearHasPendingResourcesIfPossible().
841
842 2012-12-07  Eberhard Graether  <egraether@google.com>
843
844         Web Inspector: Add shortcut to set visibility:hidden on elements in the ElementsPanel
845         https://bugs.webkit.org/show_bug.cgi?id=104146
846
847         Reviewed by Pavel Feldman.
848
849         This change adds the shortcut H to set and unset visibility:hidden on the inline style
850         of elements in the Elementspanel. This feature makes it easier to look for elements that
851         cause bad rendering performance, because visibility:hidden does not paint the element,
852         but preserves the layout.
853
854         No new tests.
855
856         * English.lproj/localizedStrings.js:
857         * inspector/front-end/CSSStyleModel.js:
858         (WebInspector.CSSStyleModel.prototype.toggleInlineVisibility):
859         * inspector/front-end/ElementsPanelDescriptor.js:
860         (WebInspector.ElementsPanelDescriptor.prototype.registerShortcuts):
861         * inspector/front-end/ElementsTreeOutline.js:
862         (WebInspector.ElementsTreeOutline.prototype.handleShortcut):
863         * inspector/front-end/KeyboardShortcut.js:
864
865 2012-12-07  Andreas Kling  <akling@apple.com>
866
867         Improve our decoded data size estimation for style sheets.
868         <http://webkit.org/b/104388>
869
870         Reviewed by Antti Koivisto.
871
872         Tweak how we estimate the total decoded size of a given style sheet. (We were guessing at about 30% of actual size.)
873         This is just used as a hint to the WebCore cache.
874
875         * css/StylePropertySet.cpp:
876         (WebCore::StylePropertySet::averageSizeInBytes):
877         * css/StyleRule.cpp:
878         (WebCore::StyleRule::averageSizeInBytes):
879
880 2012-12-07  Robert Hogan  <robert@webkit.org>
881
882         REGRESSION(r127163): Content is offset to the right at rea.ru
883         https://bugs.webkit.org/show_bug.cgi?id=103116
884
885         Reviewed by David Hyatt.
886
887         The top margin edge of a self-collapsing block that clears a float intrudes up into it by the height of the margin,
888         so to ensure any child floats of the self-collapsing block only go as far as the top content edge 
889         add the margin back in to the block's current height before placing them.
890
891         Tests: fast/block/margin-collapse/self-collapsing-block-with-float-child-collapsed-margins.html
892                fast/block/margin-collapse/self-collapsing-block-with-float-child.html
893
894         * rendering/RenderBlockLineLayout.cpp:
895         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
896
897 2012-12-07  Alexis Menard  <alexis@webkit.org>
898
899         Improve r136754 by hardening checks of expected values for background-position.
900         https://bugs.webkit.org/show_bug.cgi?id=104380
901
902         Reviewed by Antti Koivisto.
903
904         r136754 was landed to fix the problem of checking successively two calc
905         values with validUnit. It was asserting as validUnit expect you to use
906         the parsed value of the calc after the call. In this case we pre-check the
907         background-position longhand to count how many values it has to then
908         call the right parsing functions accordingly. While r136754 is not
909         wrong it is better to harden isPotentialPositionValue with the real
910         expected units and keywords. For this matter we can reuse the
911         ReleaseParsedCalcValueCondition enum which was created with the same
912         idea as this patch. If you are not interested of the calc parsed
913         value when calling validUnit() you can now specify it, I believe it is
914         good to have it explicit to avoid mistake in the future.
915
916         No new tests : this is covered by css3/*, fast/backgrounds/*.
917
918         * css/CSSParser.cpp:
919         (WebCore::CSSParser::validCalculationUnit):
920         (WebCore::CSSParser::validUnit):
921         (WebCore::CSSParser::isPotentialPositionValue):
922         * css/CSSParser.h:
923         (WebCore::CSSParser::validUnit):
924         (CSSParser):
925
926 2012-12-07  Brent Fulgham  <bfulgham@webkit.org>
927
928         Remove unnecessary casts in transformations.
929         https://bugs.webkit.org/show_bug.cgi?id=104376
930
931         Reviewed by Simon Fraser.
932
933         Several casts from float-to-double are performed prior to
934         storing the result in a double type. These casts are unnecessary
935         overhead and reduce the clarity of the source code.
936
937         No new tests. Covered by existing CSS test cases.
938
939         * platform/graphics/transforms/RotateTransformOperation.cpp:
940         * platform/graphics/transforms/TransformationMatrix.cpp:
941
942 2012-12-07  Antoine Quint  <graouts@apple.com>
943
944         Provide the backend for exposing the layer tree to the Web Inspector
945         https://bugs.webkit.org/show_bug.cgi?id=103513
946
947         Reviewed by Pavel Feldman.
948
949         The purpose of this patch is to provide a new agent enabling the Web Inspector to interface
950         with WebCore to access information about the render layer tree and, more specifically, expose
951         useful information about layers backed by textures composited on the GPU such as metrics and
952         backing store. Thus we now provide a LayerTreeAgent which will inform the front-end of 
953         changes to the render layer tree via a new layerTreeDidChange event, providing an object
954         containing the entire hierarchy of RenderLayers for the inspected document. This hierarchy 
955         can be queried at any time using the .getLayerTree() method on the LayerTreeAgent. Finally, 
956         the LayerTreeAgent also exposes a .nodeIdForLayerId() method allowing to get the id of the 
957         node associated with the RenderLayer with the provided layer id.
958         
959         In terms of implementation, RenderLayerCompositor has been changed such that in its 
960         updateCompositingLayers() method we call the layerTreeDidChange method on the 
961         InspectorLayerTreeAgent instance via the InspectorInstrumentation.
962
963         Test: inspector-protocol/layer-tree.html
964
965         * CMakeLists.txt:
966         * GNUmakefile.list.am:
967         * Target.pri:
968         * WebCore.gypi:
969         * WebCore.vcproj/WebCore.vcproj:
970         * WebCore.xcodeproj/project.pbxproj:
971         * inspector/Inspector.json: Define new types IntRect (x, y, width, height) and Layer, which 
972         holds the information for a RenderLayer (layerId, bounds, isComposited, memory, 
973         compositedBounds) and its children (childLayers). We also define the methods of the 
974         LayerTreeAgent object (enable, disable, getLayerTree, nodeIdForLayerId) and the 
975         layerTreeDidChange event it  
976         fires.
977         * inspector/InspectorAllInOne.cpp:
978         * inspector/InspectorController.cpp:
979         (WebCore::InspectorController::InspectorController):
980         * inspector/InspectorDOMAgent.cpp:
981         (WebCore::InspectorDOMAgent::pushNodePathForRenderLayerToFrontend): New method facilitating 
982         pushing the node associated with a given RenderLayer to the front-end.
983         (WebCore):
984         * inspector/InspectorDOMAgent.h:
985         (InspectorDOMAgent):
986         * inspector/InspectorInstrumentation.cpp:
987         (WebCore):
988         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
989         (WebCore::InspectorInstrumentation::layerTreeDidChangeImpl):
990         (WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
991         * inspector/InspectorInstrumentation.h:
992         (WebCore):
993         (InspectorInstrumentation):
994         (WebCore::InspectorInstrumentation::layerTreeDidChange):
995         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
996         * inspector/InspectorLayerTreeAgent.cpp: Added.
997         (WebCore):
998         (LayerTreeAgentState):
999         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
1000         (WebCore::InspectorLayerTreeAgent::~InspectorLayerTreeAgent):
1001         (WebCore::InspectorLayerTreeAgent::setFrontend):
1002         (WebCore::InspectorLayerTreeAgent::clearFrontend):
1003         (WebCore::InspectorLayerTreeAgent::restore):
1004         (WebCore::InspectorLayerTreeAgent::reset):
1005         (WebCore::InspectorLayerTreeAgent::enable):
1006         (WebCore::InspectorLayerTreeAgent::disable):
1007         (WebCore::InspectorLayerTreeAgent::layerTreeDidChange):
1008         (WebCore::InspectorLayerTreeAgent::renderLayerDestroyed):
1009         (WebCore::InspectorLayerTreeAgent::getLayerTree):
1010         (WebCore::InspectorLayerTreeAgent::buildObjectForRootLayer):
1011         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): Build the entire hierarchy of 
1012         RenderLayers from the provided RenderLayer.
1013         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
1014         (WebCore::InspectorLayerTreeAgent::bind):
1015         (WebCore::InspectorLayerTreeAgent::unbind):
1016         (WebCore::InspectorLayerTreeAgent::nodeIdForLayerId):
1017         * inspector/InspectorLayerTreeAgent.h: Added.
1018         (WebCore):
1019         (InspectorLayerTreeAgent):
1020         (WebCore::InspectorLayerTreeAgent::create):
1021         * inspector/InstrumentingAgents.h:
1022         (WebCore):
1023         (WebCore::InstrumentingAgents::InstrumentingAgents):
1024         (InstrumentingAgents):
1025         (WebCore::InstrumentingAgents::inspectorLayerTreeAgent):
1026         (WebCore::InstrumentingAgents::setInspectorLayerTreeAgent):
1027         * rendering/RenderLayerCompositor.cpp:
1028         (WebCore::RenderLayerCompositor::updateCompositingLayers): Call the layerTreeDidChange method 
1029         on the LayerTreeAgent via the InspectorInstrumentation to inform the front-end that the 
1030         RenderLayer hierarchy has changed.
1031         (WebCore):
1032         (WebCore::RenderLayerCompositor::layerBecameNonComposited): Call the renderLayerDestroyed 
1033         method on the LayerTreeAgent via the InspectorInstrumentation to unbind the layer that is 
1034         being destroyed.
1035         * rendering/RenderLayerCompositor.h:
1036         (RenderLayerCompositor):
1037
1038 2012-12-07  Joshua Bell  <jsbell@chromium.org>
1039
1040         IndexedDB: Check SSV version when opening database
1041         https://bugs.webkit.org/show_bug.cgi?id=102243
1042
1043         Reviewed by Tony Chang.
1044
1045         Ensure that the data format (SerializedScriptValue) isn't "from the future" when opening
1046         a backing store. Treat an unknown version the same as an unknown schema version.
1047
1048         Chromium-side test at https://codereview.chromium.org/11470013/ (same as other schema version tests)
1049
1050         * Modules/indexeddb/IDBBackingStore.cpp:
1051         (WebCore):
1052         (WebCore::isSchemaKnown): Check data version as well.
1053         (WebCore::setUpMetadata): Ensure data version is recorded; bump schema version.
1054         * Modules/indexeddb/IDBLevelDBCoding.cpp: Encoding for "DataVersion" global metadata entry.
1055         (IDBLevelDBCoding):
1056         (WebCore::IDBLevelDBCoding::compare):
1057         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
1058         * Modules/indexeddb/IDBLevelDBCoding.h:
1059         (DataVersionKey):
1060         (IDBLevelDBCoding):
1061         * bindings/js/SerializedScriptValue.cpp:
1062         (SerializedScriptValue::wireFormatVersion): New method (JSC side).
1063         * bindings/js/SerializedScriptValue.h:
1064         * bindings/v8/SerializedScriptValue.cpp:
1065         (WebCore::SerializedScriptValue::wireFormatVersion): New method (V8 side).
1066         (WebCore):
1067         * bindings/v8/SerializedScriptValue.h:
1068         (SerializedScriptValue):
1069
1070 2012-12-07  Andreas Kling  <akling@apple.com>
1071
1072         Throw away StyleResolvers that haven't been used for a long time.
1073         <http://webkit.org/b/104314>
1074
1075         Reviewed by Antti Koivisto.
1076
1077         A lot of memory gets tied up in StyleResolver and the structures and caches that hang from it.
1078         Add a mechanism to throw it away after it's been unused for a while (1 minute.)
1079         This frees up large amounts of memory on inactive pages (background tabs) and static content.
1080
1081         We already have a number of scenarios where the document style is invalidated by throwing away
1082         the StyleResolver so the major code paths are prepared for having a null StyleResolver* on occasion.
1083
1084         ~20MB progression on Membuster3.
1085
1086         * css/StyleResolver.cpp:
1087         (WebCore::StyleResolver::styleForElement):
1088         (WebCore::StyleResolver::styleForKeyframe):
1089         (WebCore::StyleResolver::pseudoStyleForElement):
1090         (WebCore::StyleResolver::styleForPage):
1091
1092             Call document()->didAccessStyleResolver() from the relevant parts of StyleResolver's public API.
1093             This prevents Document from throwing the StyleResolver away for 1 minute after it's used.
1094
1095         * dom/Document.h:
1096         * dom/Document.cpp:
1097         (WebCore::Document::Document):
1098         (WebCore::Document::createStyleResolver):
1099         (WebCore::Document::didAccessStyleResolver):
1100         (WebCore::Document::styleResolverThrowawayTimerFired):
1101
1102             Add a mechanism to call clearStyleResolver() on a refreshing timer.
1103
1104         * dom/Element.cpp:
1105         (WebCore::Element::attributeChanged):
1106
1107             If an attribute change occurs while the document doesn't have a StyleResolver, dirty the element style
1108             since we can't be sure that the attribute change didn't affect any rules.
1109
1110 2012-12-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>
1111
1112         REGRESSION(r136947): Made two tests fail on all platforms (Requested by tonikitoo-ll on #webkit).
1113         https://bugs.webkit.org/show_bug.cgi?id=104368
1114
1115         Unreviewed partial rollout.
1116
1117         r136947 was too aggressive in the sense of fixing RenderBox::canBeScrolledAndHasScrollableArea
1118         as part of itself. Revert the related changes in order to fix both
1119         fast/events/autoscroll-should-not-stop-on-keypress.html and
1120         fast/events/autoscroll-in-textfield.html
1121
1122         * rendering/RenderBox.cpp:
1123         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
1124         * rendering/RenderBox.h:
1125
1126 2012-12-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1127
1128         [TexMap] Can not do multiple accelerated animations
1129         https://bugs.webkit.org/show_bug.cgi?id=104364
1130
1131         Reviewed by Kenneth Rohde Christiansen.
1132
1133         By removing all animations with the same name, it is not possible to animate more than one property accelerated. 
1134         Instead only remove any animations with both same name and property.
1135
1136         Covered by animations/opacity-transform-animation.html.
1137
1138         * platform/graphics/GraphicsLayerAnimation.cpp:
1139         (WebCore::GraphicsLayerAnimations::add):
1140         (WebCore::GraphicsLayerAnimations::remove):
1141         * platform/graphics/GraphicsLayerAnimation.h:
1142         (GraphicsLayerAnimations):
1143
1144 2012-12-07  Sujin Park  <sujjin.park@gmail.com>
1145
1146         [EFL] Fix build warning in StyleResolver.cpp using gcc 4.7.2
1147         https://bugs.webkit.org/show_bug.cgi?id=104262
1148
1149         Reviewed by Alexis Menard.
1150
1151         EFL port treats build warning as compile error and there are
1152         maybe-uninitialized when building with gcc 4.7.2.
1153         This patch adds default case to resolve a build break.
1154
1155         * css/StyleResolver.cpp:
1156         (WebCore::getFontAndGlyphOrientation):
1157
1158 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
1159
1160         Web Inspector: [Chromium] Ctrl + ']' "Goto right panel" keyboard shortcut doesn't work
1161         https://bugs.webkit.org/show_bug.cgi?id=104250
1162
1163         Reviewed by Pavel Feldman.
1164
1165         Ignore "keypress" event resulting from a WM_CHAR message emitted by Win7 upon Ctrl + ']' keypress.
1166
1167         * inspector/front-end/InspectorView.js:
1168         (WebInspector.InspectorView.prototype._keyPress): Ignore all events with charCode < 32.
1169
1170 2012-10-03  Pavel Feldman  <pfeldman@chromium.org>
1171
1172         Web Inspector: provide a way to reload page with given script preprocessor.
1173         https://bugs.webkit.org/show_bug.cgi?id=80992
1174
1175         Reviewed by Yury Semikhatsky.
1176
1177         This change introduces a way to inject 'preprocessor' script that would process
1178         each JavaScript file before it gets into the VM for compilation. That way inspector
1179         can expose capabilities such as assessing code coverage or tracing all the calls.
1180
1181         Preprocessor script is stored in the page agent where it waits for reload to happen.
1182         Upon reload, ScriptDebugServer is using it to patch the script sources.
1183
1184         
1185         Test: inspector/debugger/debugger-script-preprocessor.html
1186
1187         * bindings/js/ScriptDebugServer.h:
1188         (WebCore::ScriptDebugServer::setScriptPreprocessor):
1189         (ScriptDebugServer):
1190         * bindings/v8/DebuggerScript.js:
1191         * bindings/v8/ScriptDebugServer.cpp:
1192         (ScriptDebugServer::ScriptPreprocessor):
1193         (WebCore::ScriptDebugServer::ScriptPreprocessor::ScriptPreprocessor):
1194         (WebCore::ScriptDebugServer::ScriptPreprocessor::preprocessSourceCode):
1195         (WebCore::ScriptDebugServer::ScriptPreprocessor::~ScriptPreprocessor):
1196         (WebCore):
1197         (WebCore::ScriptDebugServer::~ScriptDebugServer):
1198         (WebCore::ScriptDebugServer::setScriptSource):
1199         (WebCore::ScriptDebugServer::setScriptPreprocessor):
1200         (WebCore::ScriptDebugServer::handleV8DebugEvent):
1201         * bindings/v8/ScriptDebugServer.h:
1202         (ScriptDebugServer):
1203         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1204         (WebCore::InjectedScriptManager::createInjectedScript):
1205         * inspector/Inspector.json:
1206         * inspector/InspectorController.cpp:
1207         (WebCore::InspectorController::InspectorController):
1208         * inspector/InspectorDebuggerAgent.h:
1209         (InspectorDebuggerAgent):
1210         * inspector/InspectorPageAgent.cpp:
1211         (WebCore::InspectorPageAgent::reload):
1212         (WebCore::InspectorPageAgent::frameNavigated):
1213         * inspector/InspectorPageAgent.h:
1214         (WebCore::InspectorPageAgent::page):
1215         (WebCore::InspectorPageAgent::scriptPreprocessor):
1216         (InspectorPageAgent):
1217         * inspector/PageDebuggerAgent.cpp:
1218         (WebCore::PageDebuggerAgent::create):
1219         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
1220         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer):
1221         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
1222         (WebCore::PageDebuggerAgent::injectedScriptForEval):
1223         (WebCore::PageDebuggerAgent::didClearMainFrameWindowObject):
1224         (WebCore):
1225         * inspector/PageDebuggerAgent.h:
1226         (WebCore):
1227         (PageDebuggerAgent):
1228
1229 2012-12-07  Alexander Pavlov  <apavlov@chromium.org>
1230
1231         Web Inspector: the "Sources" column is always empty in CSS selector profiles
1232         https://bugs.webkit.org/show_bug.cgi?id=104225
1233
1234         Reviewed by Pavel Feldman.
1235
1236         r112923 and preceding changesets modified the CSSOM wrapper creation for StyleRules in a way
1237         that would not specify the parent CSSStyleSheet for the CSSStyleRules created. Instead,
1238         styleResolver->ensureFullCSSOMWrapperForInspector(rule) is now used to make sure the CSSStyleRule
1239         has a valid parent CSSStyleSheet.
1240
1241         Test: inspector/profiler/selector-profiler-url.html
1242
1243         * css/StyleResolver.cpp:
1244         (WebCore::StyleResolver::collectMatchingRulesForList):
1245         (WebCore::StyleResolver::applyProperties):
1246         * inspector/InspectorInstrumentation.cpp:
1247         (WebCore):
1248         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
1249         (WebCore::InspectorInstrumentation::willProcessRuleImpl):
1250         * inspector/InspectorInstrumentation.h:
1251         (WebCore):
1252         (InspectorInstrumentation):
1253         (WebCore::InspectorInstrumentation::willMatchRule):
1254         (WebCore::InspectorInstrumentation::willProcessRule):
1255
1256 2012-12-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>
1257
1258         Rework bug 97927 to not depend on RenderLayer::allowsScrolling
1259         https://bugs.webkit.org/show_bug.cgi?id=103999
1260
1261         Reviewed by James Robinson.
1262
1263         Patch makes it possible for methods like
1264         RenderLayer::{updateScrollbarsAfterLayout,updateScrollbarsAfterStyleChange}
1265         to not depend on RenderLayer::allowsScrolling to determine if a layer should
1266         be added or removed from its FrameView's ScrollableArea set.
1267
1268         Following the same logic, the patch also fixes RenderBox::canBeScrolledAndHasScrollableArea
1269         method to take into account the box' scroll allowance in a given direction only
1270         when it overflows. This allows simplifying custom methods like InRegionScrollerPrivate::canScrollRenderBox
1271         (@WebKit/blackberry/Api/InRegionScroller.cpp).
1272
1273         The naming pattern for the newly added methods were chosen to keep the consistency
1274         with the existing ones, in the same class.
1275
1276         No new test: it is already covered by ScrollingCoordinatorChromiumTest.clippedBodyTest.
1277
1278         * rendering/RenderBox.cpp:
1279         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
1280         * rendering/RenderBox.h:
1281         (RenderBox):
1282         (WebCore::RenderBox::hasScrollableOverflowX):
1283         (WebCore::RenderBox::hasScrollableOverflowY):
1284         * rendering/RenderLayer.cpp:
1285         (WebCore::RenderLayer::hasScrollableHorizontalOverflow):
1286         (WebCore):
1287         (WebCore::RenderLayer::hasScrollableVerticalOverflow):
1288         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
1289         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
1290         * rendering/RenderLayer.h:
1291         (RenderLayer):
1292
1293 2012-12-07  Max Feil  <mfeil@rim.com>
1294
1295         [BlackBerry] make "isVideo" information available to platform media player
1296         https://bugs.webkit.org/show_bug.cgi?id=104334
1297
1298         Reviewed by Rob Buis.
1299
1300         The platform player needs to know whether the element is <video>
1301         or <audio>, so it can make certain decisions before metadata
1302         is ready. This is part of a performance optimization refactor
1303         which does not change functionality so no new tests are required.
1304
1305         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1306         (WebCore::MediaPlayerPrivate::load):
1307
1308 2012-12-07  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1309
1310         [EFL] [AC] Implement ImageExtractor::extractImage in GraphicsContext3DEfl.
1311         https://bugs.webkit.org/show_bug.cgi?id=104271.
1312
1313         Reviewed by Kenneth Rohde Christiansen.
1314
1315         This patch implements ImageExtractor::extractImage in GraphicsContext3DEfl.
1316
1317         Covered by existing tests.
1318
1319         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1320         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
1321         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1322
1323 2012-12-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1324
1325         Use always the order iterator from data member in RenderFlexibleBox
1326         https://bugs.webkit.org/show_bug.cgi?id=104112
1327
1328         Reviewed by Tony Chang.
1329
1330         Some methods receive it as parameter and others use the data
1331         member.
1332
1333         * rendering/RenderFlexibleBox.cpp:
1334         (WebCore::RenderFlexibleBox::layoutBlock):
1335         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
1336         (WebCore::RenderFlexibleBox::layoutFlexItems):
1337         (WebCore::RenderFlexibleBox::computeNextFlexLine):
1338         (WebCore::RenderFlexibleBox::alignFlexLines):
1339         (WebCore::RenderFlexibleBox::alignChildren):
1340         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
1341         (WebCore::RenderFlexibleBox::flipForWrapReverse):
1342         * rendering/RenderFlexibleBox.h:
1343
1344 2012-12-07  Kent Tamura  <tkent@chromium.org>
1345
1346         Improve confusing code in BaseMultipleFieldsDateAndTimeInputType
1347         https://bugs.webkit.org/show_bug.cgi?id=104353
1348
1349         Reviewed by Kentaro Hara.
1350
1351         This doesn't change any behavior because call sites of
1352         isEditControlOwnerDisabled and isEditControlOwnerReadOnly treat them
1353         similarly.
1354
1355         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1356         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerDisabled):
1357         Checks element()->disabled, not readOnly.
1358         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly):
1359         Checks element()->readOnly, not disabled.
1360
1361 2012-12-07  Jon Lee  <jonlee@apple.com>
1362
1363         Build fix.
1364
1365         * plugins/PlugInOriginHash.cpp:
1366         (WebCore::PlugInOriginHash::hash):
1367
1368 2012-12-04  Jon Lee  <jonlee@apple.com>
1369
1370         Add PlugInOriginHash
1371         https://bugs.webkit.org/show_bug.cgi?id=103655
1372         <rdar://problem/12778949>
1373
1374         Reviewed by Alexey Proskuryakov.
1375
1376         Add the concept of plug-in origin hashes, which are based on a combination of the base domains of the
1377         page's main frame and the plug-in, and the plug-in MIME type.
1378
1379         * plugins/PlugInOriginHash.cpp: Added.
1380         (WebCore::addCaseFoldedCharacters): Add the case-folded string to the hash.
1381         (WebCore::PlugInOriginHash::hash): The hash is based on the concatenation of the page's host, the plug-in
1382         URL's host, and the MIME type. We use StringHasher to get all 32-bits of the hash, since using StringImpl's hash
1383         masks out 8 of the hash bits to make room for bit flags.
1384         * plugins/PlugInOriginHash.h: Added.
1385
1386         * CMakeLists.txt:
1387         * GNUmakefile.list.am:
1388         * Target.pri:
1389         * WebCore.gypi:
1390         * WebCore.vcproj/WebCore.vcproj:
1391         * WebCore.xcodeproj/project.pbxproj:
1392
1393 2012-12-06  Kent Tamura  <tkent@chromium.org>
1394
1395         Refactoring: Clean up placeholder attribute usage
1396         https://bugs.webkit.org/show_bug.cgi?id=104337
1397
1398         Reviewed by Kentaro Hara.
1399
1400         No new tests. This doesn't change any behavior.
1401
1402         * html/HTMLInputElement.cpp: Remove placeholder and setPlacehodler.
1403         * html/HTMLInputElement.h: Ditto.
1404         * html/HTMLTextFormControlElement.cpp:
1405         (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
1406         We can use fastGetAttribute for placeholder.
1407         (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty):
1408         Ditto.
1409
1410 2012-12-06  Kent Tamura  <tkent@chromium.org>
1411
1412         Refactoring: Rename HTMLFormControlElement::required to isRequired
1413         https://bugs.webkit.org/show_bug.cgi?id=104336
1414
1415         Reviewed by Kentaro Hara.
1416
1417         m_required should be m_isRequired, and required() should be
1418         isRequired. It's safe to rename them because HTML*Element::required IDL
1419         attributes are [Reflected].
1420         http://www.webkit.org/coding/coding-style.html#names-bool
1421
1422         * accessibility/AccessibilityNodeObject.cpp:
1423         (WebCore::AccessibilityNodeObject::isRequired):
1424         * css/StyleResolver.cpp:
1425         (WebCore::StyleResolver::canShareStyleWithControl):
1426         * dom/CheckedRadioButtons.cpp:
1427         (WebCore::RadioButtonGroup::add):
1428         (WebCore::RadioButtonGroup::requiredAttributeChanged):
1429         (WebCore::RadioButtonGroup::remove):
1430         * html/CheckboxInputType.cpp:
1431         (WebCore::CheckboxInputType::valueMissing):
1432         * html/FileInputType.cpp:
1433         (WebCore::FileInputType::valueMissing):
1434         * html/HTMLFormControlElement.cpp:
1435         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1436         (WebCore::HTMLFormControlElement::parseAttribute):
1437         (WebCore::HTMLFormControlElement::isRequired):
1438         * html/HTMLFormControlElement.h:
1439         (HTMLFormControlElement):
1440         * html/HTMLInputElement.cpp:
1441         (WebCore::HTMLInputElement::isRequiredFormControl):
1442         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
1443         * html/HTMLSelectElement.cpp:
1444         (WebCore::HTMLSelectElement::valueMissing):
1445         (WebCore::HTMLSelectElement::isRequiredFormControl):
1446         * html/HTMLTextAreaElement.h:
1447         (WebCore::HTMLTextAreaElement::isRequiredFormControl):
1448         * html/TextFieldInputType.cpp:
1449         (WebCore::TextFieldInputType::valueMissing):
1450
1451 2012-12-06  Hajime Morrita  <morrita@google.com>
1452
1453         [Shadow DOM] Implement Element::shadowRoot with prefix
1454         https://bugs.webkit.org/show_bug.cgi?id=102912
1455
1456         Reviewed by Dimitri Glazkov.
1457
1458         - Added Element::shadowRoot() which return the youngest author shadow root.
1459         - Renamed existing Node::shadowRoot() to containingShadowRoot() to avoid name shadowing.
1460           The name shadowRoot() is confusing anyway so this is good opportunity to rename it.
1461
1462         Test: fast/dom/shadow/shadow-aware-shadow-root.html
1463
1464         * css/SelectorChecker.cpp:
1465         (WebCore::SelectorChecker::checkSelector):
1466         * css/StyleScopeResolver.cpp:
1467         (WebCore::StyleScopeResolver::scopeFor):
1468         (WebCore::StyleScopeResolver::addHostRule):
1469         * dom/Element.cpp:
1470         (WebCore::Element::shadowRoot):
1471         (WebCore):
1472         * dom/Element.h:
1473         (Element):
1474         * dom/Element.idl:
1475         * dom/ElementShadow.cpp:
1476         (WebCore::ElementShadow::setShouldCollectSelectFeatureSet):
1477         * dom/Node.cpp:
1478         (WebCore::Node::rendererIsEditable):
1479         (WebCore::Node::shadowHost):
1480         (WebCore::Node::shadowAncestorNode):
1481         (WebCore::Node::containingShadowRoot):
1482         * dom/Node.h:
1483         (Node):
1484         * dom/Range.cpp:
1485         (WebCore::Range::shadowRoot):
1486         * dom/ShadowRoot.cpp:
1487         (WebCore::ShadowRoot::insertedInto):
1488         (WebCore::ShadowRoot::removedFrom):
1489         * dom/ShadowRoot.h:
1490         (WebCore::ShadowRoot::isAccessible):
1491         * editing/TextIterator.cpp:
1492         (WebCore::TextIterator::handleReplacedElement):
1493         * editing/htmlediting.cpp:
1494         (WebCore::indexForVisiblePosition):
1495         * html/HTMLStyleElement.cpp:
1496         (WebCore::HTMLStyleElement::scopedAttributeChanged):
1497         (WebCore::HTMLStyleElement::registerWithScopingNode):
1498         (WebCore::HTMLStyleElement::removedFrom):
1499         * html/shadow/ContentDistributor.cpp:
1500         (WebCore::ContentDistributor::distribute):
1501         * html/shadow/HTMLContentElement.cpp:
1502         (WebCore::HTMLContentElement::parseAttribute):
1503         (WebCore::HTMLContentElement::insertedInto):
1504         (WebCore::HTMLContentElement::removedFrom):
1505         * html/shadow/HTMLShadowElement.cpp:
1506         (WebCore::HTMLShadowElement::insertedInto):
1507         (WebCore::HTMLShadowElement::removedFrom):
1508         * html/shadow/InsertionPoint.cpp:
1509         (WebCore::InsertionPoint::attach):
1510         (WebCore::InsertionPoint::detach):
1511         (WebCore::InsertionPoint::isActive):
1512         (WebCore::InsertionPoint::childrenChanged):
1513         (WebCore::InsertionPoint::insertedInto):
1514         (WebCore::InsertionPoint::removedFrom):
1515         (WebCore::InsertionPoint::setResetStyleInheritance):
1516         * page/EventHandler.cpp:
1517         (WebCore::instanceAssociatedWithShadowTreeElement):
1518         * svg/SVGElement.cpp:
1519         (WebCore::SVGElement::correspondingElement):
1520         (WebCore::collectInstancesForSVGElement):
1521
1522 2012-12-06  Michael Pruett  <michael@68k.org>
1523
1524         IndexedDB: Replace int64 with int64_t
1525         https://bugs.webkit.org/show_bug.cgi?id=104338
1526
1527         Reviewed by Kentaro Hara.
1528
1529         Cleaning up coding inconsistencies, no change in behavior.
1530
1531         Tests: storage/indexeddb/*
1532
1533         * Modules/indexeddb/IDBFactory.cpp:
1534         (WebCore::IDBFactory::openInternal):
1535
1536 2012-12-06  James Simonsen  <simonjam@chromium.org>
1537
1538         [Resource Timing] Allow detailed timing on same origin sites
1539         https://bugs.webkit.org/show_bug.cgi?id=104328
1540
1541         Reviewed by Tony Gentilcore.
1542
1543         This block was lost when I moved it to PerformanceResourceTiming.cpp.
1544
1545         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_attribute_order.html
1546
1547         * page/PerformanceResourceTiming.cpp:
1548         (WebCore::passesTimingAllowCheck):
1549
1550 2012-12-06  Rick Byers  <rbyers@chromium.org>
1551
1552         CSS cursor property should support webkit-image-set
1553         https://bugs.webkit.org/show_bug.cgi?id=99493
1554
1555         Reviewed by Beth Dakin.
1556
1557         Add support for image scale factors attached to custom mouse cursor images
1558         behind ENABLE(MOUSE_CURSOR_SCALE).
1559
1560         This required refactoring CSSCursorImageValue to derive directly from
1561         CSSValue since it can contain either a CSSImageValue or a CSSImageSetValue.
1562         If it contains an image-set, then we can plumb directly through to the
1563         CSSImageSetValue.  If it contains an image, then either we can plumb directly
1564         through to the CSSImageValue, or if the URL represents an SVG cursor we have
1565         to intercept the image loading in order to substitute the actual SVG image URL
1566         and do the appropriate lifetime management.
1567
1568         Tests: fast/css/cursor-parsing-image-set.html
1569                fast/events/mouse-cursor-image-set.html
1570
1571         * Configurations/FeatureDefines.xcconfig: Add ENABLE_MOUSE_CURSOR_SCALE - disabled
1572         * GNUmakefile.features.am: ditto
1573         * css/CSSCursorImageValue.cpp: Refactor to inherit directly from CSSValue and support image sets
1574         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
1575         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1576         (WebCore::CSSCursorImageValue::customCssText):
1577         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1578         (WebCore::CSSCursorImageValue::cachedImage):
1579         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
1580         (WebCore::CSSCursorImageValue::isSVGCursor):
1581         (WebCore::CSSCursorImageValue::cachedImageURL):
1582         (WebCore::CSSCursorImageValue::clearCachedImage):
1583         (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
1584         * css/CSSCursorImageValue.h: Remove cursor-specific hacks
1585         (WebCore::CSSCursorImageValue::create):
1586         (CSSCursorImageValue):
1587         * css/CSSImageValue.cpp:
1588         (WebCore::CSSImageValue::cachedImage):
1589         * css/CSSImageValue.h:
1590         (CSSImageValue):
1591         * css/CSSParser.cpp:
1592         (WebCore::CSSParser::parseValue): Parse cursor(-webkit-image-set(...)) rules
1593         * css/CSSValue.h:
1594         (WebCore::CSSValue::isImageValue):
1595         * css/StyleBuilder.cpp:
1596         (WebCore::ApplyPropertyCursor::applyValue):
1597         * css/StyleResolver.cpp: Hook up new CSSCursorImageValue support since it can't be handled like other images any more.
1598         (WebCore::StyleResolver::styleImage):
1599         (WebCore::StyleResolver::cursorOrPendingFromValue):
1600         (WebCore::StyleResolver::loadPendingImage):
1601         * css/StyleResolver.h:
1602         (StyleResolver):
1603         * page/EventHandler.cpp:
1604         (WebCore::EventHandler::selectCursor): Handle StyleCachedImageSet images and plumb scale factor through
1605         * platform/Cursor.cpp:
1606         (WebCore::Cursor::Cursor): Add imageScaleFactor
1607         * platform/Cursor.h: Add imageScaleFactor
1608         (Cursor):
1609         (WebCore::Cursor::imageScaleFactor):
1610         * platform/chromium/CursorChromium.cpp: Add imageScaleFactor
1611         (WebCore::Cursor::Cursor):
1612         (WebCore::Cursor::operator=):
1613         * rendering/style/CursorData.h: Clarify hotspot units
1614         (CursorData):
1615         * rendering/style/StyleCachedImage.h:
1616         (StyleCachedImage::cachedImage): Override new virtual.
1617         * rendering/style/StyleCachedImageSet.h:
1618         (StyleCachedImageSet::cachedImage): Override new virtual.
1619         * rendering/style/StyleImage.h:
1620         (StyleImage::cachedImage): Add new virtual method to avoid lots of casts and typechecks.
1621         * rendering/style/StylePendingImage.h: Add CSSCursorImageValue support
1622         (WebCore::StylePendingImage::cssCursorImageValue):
1623         * testing/Internals.cpp:
1624         (WebCore::Internals::getCurrentCursorInfo): Print non-identity scale factors for testing
1625
1626 2012-12-06  Hayato Ito  <hayato@chromium.org>
1627
1628         Event's relatedTarget re-targeting does not occur for manually fired mouse events created by event.initMouseEvent().
1629         https://bugs.webkit.org/show_bug.cgi?id=102681
1630
1631         Reviewed by Dimitri Glazkov.
1632
1633         Make sure that event's relatedTarget re-targeting occurs for mouse
1634         events created by event.initMouseEvent().  Since user-generated
1635         mouse events can have a relatedTarget which is same to the target
1636         node, the algorithm which calculates event's ancestors is also
1637         updated so that ancestors are not shrunk wrongly.
1638
1639         Test: fast/events/dispatch-synthetic-mouseevent.html
1640               fast/dom/shadow/shadow-dom-event-dispatching.html
1641
1642         * dom/EventDispatcher.cpp:
1643         (WebCore::EventRelatedTargetAdjuster::adjust):
1644         * dom/MouseEvent.cpp:
1645         (WebCore::MouseEventDispatchMediator::create):
1646         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
1647         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1648         * dom/MouseEvent.h:
1649         (WebCore::MouseEventDispatchMediator::isSyntheticMouseEvent):
1650         (MouseEventDispatchMediator):
1651         * dom/Node.cpp:
1652         (WebCore::Node::dispatchEvent):
1653
1654 2012-12-06  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1655
1656         Disabled file input box stops a certain other div from being rendered
1657         https://bugs.webkit.org/show_bug.cgi?id=104226
1658
1659         Reviewed by Dimitri Glazkov.
1660
1661         The bug was caused by setNeedsStyleRecalc() call during style recalculation,
1662         which resulted in inconsistent ChildNeedsStyleRecalc flags in DOM tree.
1663
1664         When reattach of file input happens during style recalculation,
1665         RenderFileUploadControl::updateFromElement() is called from attach().
1666         It may change the disabled state of the upload button in its shadow tree,
1667         but it triggers style recalculation.
1668
1669         This patch solves this issue by setting disabled state of the upload button in
1670         FileInputType::disabledAttributeChanged instead of RenderFileUploadControl.
1671
1672         Test: fast/forms/file/sibling-of-disabled-file-input.html
1673
1674         * html/FileInputType.cpp:
1675         (WebCore::FileInputType::disabledAttributeChanged): Added.
1676         * html/FileInputType.h:
1677         (FileInputType): Declare disabledAttributeChanged.
1678         * rendering/RenderFileUploadControl.cpp:
1679         (WebCore::RenderFileUploadControl::updateFromElement): Remove call to button->setDisabled().
1680
1681 2012-12-06  Dominic Cooney  <dominicc@chromium.org>
1682
1683         Element.pseudo property should be prefixed
1684         https://bugs.webkit.org/show_bug.cgi?id=104060
1685
1686         Reviewed by Hajime Morita.
1687
1688         Other Shadow DOM properties are prefixed; pseudo should be too.
1689
1690         Covered by updated tests in fast/dom/shadow.
1691
1692         * dom/Element.idl:
1693
1694 2012-12-06  Andrei Bucur  <abucur@adobe.com>
1695
1696         [CSS Regions] Remove the sanitize mechanism from LineFragmentationData
1697         https://bugs.webkit.org/show_bug.cgi?id=104234
1698
1699         Reviewed by David Hyatt.
1700
1701         Remove previous work that ensured an invalid region is never returned by the containingRegion getter. After r136793 the blocks always
1702         relayout children if the region chain changes. This means the sanitize() method is only necessary when all the regions are removed.
1703         This case is treated separately in layoutInlineChildren.
1704
1705         Tests: no new functionality, no bug fixed.
1706
1707         * rendering/RenderBlock.cpp:
1708         (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
1709         * rendering/RenderBlockLineLayout.cpp:
1710         (WebCore::RenderBlock::layoutInlineChildren):
1711         * rendering/RootInlineBox.cpp:
1712         (WebCore::RootInlineBox::containingRegion):
1713         (WebCore):
1714         (WebCore::RootInlineBox::setContainingRegion):
1715         * rendering/RootInlineBox.h:
1716         (RootInlineBox):
1717         (WebCore::RootInlineBox::LineFragmentationData::LineFragmentationData):
1718         (LineFragmentationData):
1719
1720 2012-12-06  Kenneth Russell  <kbr@google.com>
1721
1722         Associate URLs with GraphicsContext3D instances created for WebGL
1723         https://bugs.webkit.org/show_bug.cgi?id=103793
1724
1725         Reviewed by Adam Barth.
1726
1727         Pass down the URL of the topmost frame's document creating the
1728         WebGL context to the platform layer through
1729         GraphicsContext3D::Attributes.
1730
1731         Not feasible to write a layout test for this change; has no
1732         user-visible effect. Tested manually with failure injection in
1733         Chromium port.
1734
1735         * html/canvas/WebGLRenderingContext.cpp:
1736         (WebCore):
1737         (WebCore::WebGLRenderingContext::create):
1738             Pass top document's URL in context creation attributes.
1739         * platform/chromium/support/GraphicsContext3DChromium.cpp:
1740         (WebCore::GraphicsContext3D::create):
1741             Pass URL through WebKit API.
1742         * platform/graphics/GraphicsContext3D.h:
1743         (Attributes):
1744             Add top document's URL to context creation attributes.
1745
1746 2012-12-06  Philip Rogers  <pdr@google.com>
1747
1748         Unify SVG's animation and target tracking systems.
1749         https://bugs.webkit.org/show_bug.cgi?id=102655
1750
1751         Reviewed by Dirk Schulze.
1752
1753         This patch unifies our animation target tracking system and regular target tracking system.
1754         This simplifies the code, fixes a bug, and cleans up a historically security-sensitive area.
1755
1756         Background: When <use>, <mpath>, <animate>, etc. reference another element using
1757         xlink:href="#id", we need to track when #id changes to #otherId, when #id is removed, etc.
1758         This bookkeeping of element -> target is done in SVGDocumentExtensions. Additionally, when
1759         a target changes that causes layout (e.g., rect.x is changed), all dependent elements with
1760         renderers are notified (<animate> has no renderer and will not use this).
1761
1762         Previously, xlink:href changes were lazily resolved when targetElement() was called, target
1763         changes were tracked using the animation tracking framework, and pending targets did not
1764         work (e.g., <animate xlink:href="#p"><!--animate is now pending #p --><rect id="p"/>).
1765
1766         After this patch, we no longer lazily resolve targetElement() but instead change it when
1767         our xlink:href attribute changes. Instead of using the animation tracking framework in
1768         SVGDocumentExtensions, we now use the regular target tracking framework. Lastly, by using
1769         the regular target tracking framework we are able to hook into the pending resource handling
1770         which fixes a bug (see the test).
1771
1772         A test has been added to test that the order of animation elements does not matter. A second
1773         test has been added to show we do not regress a pending-while-pending case.
1774
1775         Tests: svg/animations/svg-animation-order.html
1776                svg/custom/svg-pending-twice.html
1777
1778         * svg/SVGAnimateElement.cpp:
1779         (WebCore::SVGAnimateElement::setTargetElement):
1780
1781             setTargetElement and setAttributeName now work similarly. When the corresponding attribute
1782             changes, we update our internal state (target or attributeName) and save it instead of
1783             looking these values up on each iteration.
1784
1785         (WebCore::SVGAnimateElement::setAttributeName):
1786         (WebCore):
1787         (WebCore::SVGAnimateElement::resetAnimatedPropertyType):
1788         * svg/SVGAnimateElement.h:
1789         (SVGAnimateElement):
1790         * svg/SVGAnimationElement.cpp:
1791         (WebCore::SVGAnimationElement::setAttributeType):
1792         (WebCore::SVGAnimationElement::setTargetElement):
1793         (WebCore::SVGAnimationElement::setAttributeName):
1794         * svg/SVGAnimationElement.h:
1795         (SVGAnimationElement):
1796         * svg/SVGDocumentExtensions.cpp:
1797         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
1798         (WebCore):
1799         * svg/SVGDocumentExtensions.h:
1800         (SVGDocumentExtensions):
1801         * svg/SVGElement.cpp:
1802         (WebCore::SVGElement::~SVGElement):
1803         (WebCore::SVGElement::removedFrom):
1804         (WebCore::SVGElement::attributeChanged):
1805         * svg/SVGElementInstance.cpp:
1806         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
1807
1808             This can be removed after r131631 landed.
1809
1810         * svg/SVGMPathElement.cpp:
1811         (WebCore::SVGMPathElement::buildPendingResource):
1812         * svg/SVGTextPathElement.cpp:
1813         (WebCore::SVGTextPathElement::buildPendingResource):
1814
1815             A bug was discovered in review with our resource tracking in a pending-while-pending
1816             case. SVGMpathElement and SVGTextPathElement have been updated to fix this as well.
1817
1818         * svg/animation/SVGSMILElement.cpp:
1819
1820             The changes in SVGSMILElement should look very similar to SVGFEImageElement,
1821             SVGMPathElement, etc. The idea is to build pending resources when added or
1822             removed from the document, or when the href attribute changes.
1823
1824         (WebCore::SVGSMILElement::~SVGSMILElement):
1825         (WebCore):
1826         (WebCore::SVGSMILElement::clearResourceReferences):
1827         (WebCore::SVGSMILElement::buildPendingResource):
1828         (WebCore::SVGSMILElement::insertedInto):
1829         (WebCore::SVGSMILElement::removedFrom):
1830         (WebCore::SVGSMILElement::svgAttributeChanged):
1831         (WebCore::SVGSMILElement::setAttributeName):
1832         (WebCore::SVGSMILElement::setTargetElement):
1833         * svg/animation/SVGSMILElement.h:
1834         (WebCore):
1835         (WebCore::SVGSMILElement::targetElement):
1836         (SVGSMILElement):
1837
1838 2012-12-06  Jon Lee  <jonlee@apple.com>
1839
1840         Retry snapshots if they are too empty
1841         https://bugs.webkit.org/show_bug.cgi?id=104174
1842         <rdar://problem/12820146>
1843
1844         Reviewed by Simon Fraser.
1845
1846         * html/HTMLPlugInImageElement.cpp:
1847         (WebCore::HTMLPlugInImageElement::updateSnapshot): Change the state machine check so that even
1848         when the plug-in is displaying a snapshot, the snapshot can still be updated. This allows for the
1849         retries to be drawn.
1850
1851 2012-12-06  Adam Klein  <adamk@chromium.org>
1852
1853         [HTMLTemplateElement] make content readonly and cloneNode(deep) clone content
1854         https://bugs.webkit.org/show_bug.cgi?id=104181
1855
1856         Reviewed by Adam Barth.
1857
1858         Note that this patch also adds IDL attributes/custom code to tie the lifetime
1859         of the content DocumentFragment wrapper to the lifetime of the template element wrapper
1860         via a hidden JS property.
1861
1862         Based on a patch by Rafael Weinstein.
1863
1864         Test: fast/dom/HTMLTemplateElement/contentWrappers.html
1865
1866         * DerivedSources.cpp:
1867         * Target.pri:
1868         * UseJSC.cmake:
1869         * WebCore.gypi:
1870         * WebCore.xcodeproj/project.pbxproj:
1871         * bindings/js/JSBindingsAllInOne.cpp:
1872         * bindings/js/JSHTMLTemplateElementCustom.cpp: Copied from Source/WebCore/html/HTMLTemplateElement.idl.
1873         (WebCore):
1874         (WebCore::JSHTMLTemplateElement::content):
1875         * bindings/scripts/CodeGeneratorV8.pm: Add support for new V8CacheAttributeForGC attribute.
1876         * dom/Element.h:
1877         (Element): Annotate cloneNode() with OVERRIDE
1878         * html/HTMLTemplateElement.cpp:
1879         (WebCore::HTMLTemplateElement::cloneNode):
1880         * html/HTMLTemplateElement.h:
1881         (HTMLTemplateElement): override cloneNode
1882         * html/HTMLTemplateElement.idl: Make content readonly and add custom attributes.
1883
1884 2012-12-06  Brent Fulgham  <bfulgham@webkit.org>
1885
1886         [Windows, WinCairo] Unreviewed build correction.
1887
1888         Exclude 'DocumentSharedObjectPool.cpp' from build, since it is
1889         built as part of DOMAllInOne.cpp.  The build (besides wasting
1890         time) generates a bunch of build warnings for duplicate symbols.
1891
1892         * WebCore.vcproj/WebCore.vcproj: Mark DocumentSharedObjectPool.cpp
1893         to not build independently of DOMAllInOne.cpp.
1894
1895 2012-12-06  David Grogan  <dgrogan@chromium.org>
1896
1897         IndexedDB: Abort transactions because of leveldb errors part 4
1898         https://bugs.webkit.org/show_bug.cgi?id=103964
1899
1900         Reviewed by Tony Chang.
1901
1902         deleteDatabase, open, and deleteObjectStore will now fire more aborts
1903         and errors in case of leveldb problems
1904
1905         * Modules/indexeddb/IDBBackingStore.cpp:
1906         (WebCore::getVarInt): Make return value indicate leveldb error.
1907         (WebCore::getString): ditto.
1908         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
1909         Change return value to indicate leveldb error.
1910
1911         (WebCore::IDBBackingStore::deleteDatabase):
1912         Already had the desired return value semantics. As a consumer of
1913         getIDBDatabaseMetadata, will return an error (causing an abort) more
1914         often.
1915
1916         (WebCore::IDBBackingStore::deleteObjectStore):
1917         Needed return value change. Will return error to DatabaseBackend to
1918         indicate leveldb problems.
1919
1920         * Modules/indexeddb/IDBBackingStore.h:
1921         (IDBBackingStore):
1922         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1923         (WebCore::IDBDatabaseBackendImpl::openInternal):
1924         Pass leveldb errors up to callers, who already handle internal errors.
1925
1926         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
1927         Abort transaction if there were leveldb problems deleting an object
1928         store.
1929
1930 2012-12-06  David Grogan  <dgrogan@chromium.org>
1931
1932         IndexedDB: Add webkitErrorMessage to IDBTransaction
1933         https://bugs.webkit.org/show_bug.cgi?id=104199
1934
1935         Reviewed by Tony Chang.
1936
1937         Don't drop error messages on the floor.
1938
1939         Expose an error message on IDBTransaction to give developers more
1940         information than the opaque error code currently available. This is
1941         exactly what is done in IDBRequest. 
1942
1943         Tests - transaction-error.html
1944
1945         * Modules/indexeddb/IDBDatabaseError.h:
1946         (WebCore::IDBDatabaseError::create):
1947         * Modules/indexeddb/IDBRequest.cpp:
1948         (WebCore::IDBRequest::dispatchEvent):
1949         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
1950         * Modules/indexeddb/IDBTransaction.cpp:
1951         (WebCore::IDBTransaction::setError):
1952         (WebCore):
1953         (WebCore::IDBTransaction::webkitErrorMessage):
1954         (WebCore::IDBTransaction::onAbort):
1955         * Modules/indexeddb/IDBTransaction.h:
1956         (IDBTransaction):
1957         * Modules/indexeddb/IDBTransaction.idl:
1958
1959 2012-12-06  Alexander Shalamov  <alexander.shalamov@intel.com>
1960
1961         XMLHttpRequest Content-Type should be taken from Blob type
1962         https://bugs.webkit.org/show_bug.cgi?id=99983
1963
1964         Reviewed by Alexey Proskuryakov.
1965
1966         Fix XMLHttpRequest::send(Blob*) method, so that the Content-Type is set according to W3C specification.
1967         http://www.w3.org/TR/XMLHttpRequest/#the-send-method
1968
1969         Added test that check if content type is set correctly when blob object is sent.
1970
1971         Test: http/tests/xmlhttprequest/post-blob-content-type.html
1972
1973         * xml/XMLHttpRequest.cpp:
1974         (WebCore::XMLHttpRequest::send):
1975             Set correct MIME type for Blob objects.
1976         * WebCore.vcproj/WebCore.vcproj:
1977             Added ParsedContentType to project file.
1978
1979 2012-12-06  Min Qin  <qinmin@chromium.org>
1980
1981         Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it
1982         https://bugs.webkit.org/show_bug.cgi?id=103555
1983
1984         Reviewed by Stephen White.
1985
1986         Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef.
1987         No test added for now as impl side paiting is still WIP.
1988
1989         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1990         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1991         (WebCore::LazyDecodingPixelRef::PrepareToDecode):
1992         (WebCore):
1993         (WebCore::LazyDecodingPixelRef::Decode):
1994         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1995         (LazyDecodingPixelRef):
1996
1997 2012-12-06  Kentaro Hara  <haraken@chromium.org>
1998
1999         [V8] Make an Isolate mandatory in v8UnsignedInteger()
2000         https://bugs.webkit.org/show_bug.cgi?id=104235
2001
2002         Reviewed by Adam Barth.
2003
2004         No tests. No change in behavior.
2005
2006         * bindings/v8/ArrayValue.cpp:
2007         (WebCore::ArrayValue::get):
2008         * bindings/v8/V8Binding.h:
2009         (WebCore::v8UnsignedInteger):
2010         * bindings/v8/V8LazyEventListener.cpp:
2011         (WebCore::V8LazyEventListener::prepareListenerObject):
2012
2013 2012-12-06  David Hyatt  <hyatt@apple.com>
2014
2015         [New Multicolumn] Add requiresBalancing booleans to track which column sets need to rebalance.
2016         https://bugs.webkit.org/show_bug.cgi?id=104297
2017
2018         Reviewed by Simon Fraser.
2019
2020         Add requiresBalancing booleans to RenderMultiColumnBlock and RenderMultiColumnSet. For now the former is just propagated
2021         to the latter, but eventually RenderMultiColumnSets will have a notion of balancing that has to be independent of the
2022         owning block (e.g., maybe only the last set rebalances, or maybe only a set that contains the content between two forced
2023         breaks wants to rebalance, etc.).
2024
2025         * rendering/RenderMultiColumnBlock.cpp:
2026         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
2027         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
2028         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
2029         * rendering/RenderMultiColumnBlock.h:
2030         (WebCore::RenderMultiColumnBlock::requiresBalancing):
2031         (RenderMultiColumnBlock):
2032         * rendering/RenderMultiColumnSet.cpp:
2033         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
2034         * rendering/RenderMultiColumnSet.h:
2035         (WebCore::RenderMultiColumnSet::requiresBalancing):
2036         (WebCore::RenderMultiColumnSet::setRequiresBalancing):
2037         (RenderMultiColumnSet):
2038         (WebCore::toRenderMultiColumnSet):
2039         (WebCore):
2040
2041 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2042
2043         Unreviewed, rolling out r136871.
2044         http://trac.webkit.org/changeset/136871
2045         https://bugs.webkit.org/show_bug.cgi?id=104293
2046
2047         crashes on bots and memory leaks (Requested by esprehn on
2048         #webkit).
2049
2050         * dom/Document.h:
2051         (WebCore::Node::treeScope):
2052         * dom/Element.cpp:
2053         (WebCore::Element::createRareData):
2054         * dom/ElementRareData.h:
2055         (ElementRareData):
2056         (WebCore::ElementRareData::ElementRareData):
2057         * dom/Node.cpp:
2058         (WebCore::Node::setTreeScope):
2059         (WebCore::Node::ensureRareData):
2060         (WebCore::Node::createRareData):
2061         (WebCore::Node::clearRareData):
2062         * dom/Node.h:
2063         (WebCore::NodeRareDataBase::~NodeRareDataBase):
2064         (WebCore::NodeRareDataBase::NodeRareDataBase):
2065         (NodeRareDataBase):
2066         (WebCore::Node::renderer):
2067         (WebCore::Node::setRenderer):
2068         (Node):
2069         (WebCore::Node::hasRareData):
2070         * dom/NodeRareData.h:
2071         (WebCore::NodeRareData::NodeRareData):
2072         (NodeRareData):
2073
2074 2012-12-06  Adam Klein  <adamk@chromium.org>
2075
2076         Remove non-v8 binding files from WebCore.gypi
2077         https://bugs.webkit.org/show_bug.cgi?id=104288
2078
2079         Reviewed by Adam Barth.
2080
2081         Since the gyp build is only used by the Chromium project,
2082         there's no need for cpp, gobject, objc, or jsc bindings
2083         in these build files.
2084
2085         * WebCore.gypi:
2086
2087 2012-12-06  Tony Chang  <tony@chromium.org>
2088
2089         REGRESSION(r135082): Restore the ability to insert author level style sheets from script
2090         https://bugs.webkit.org/show_bug.cgi?id=104042
2091
2092         Reviewed by Antti Koivisto.
2093
2094         Add DocumentStyleSheetCollection::addAuthorSheet so embedders can allow scripts
2095         to insert author level styles. Expose the method to window.interals for testing.
2096
2097         Test: userscripts/insert-stylesheets.html
2098
2099         * WebCore.exp.in: Update exports for Internals.cpp.
2100         * WebCore.order: Update exports for Internals.cpp.
2101         * dom/DocumentStyleSheetCollection.cpp:
2102         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
2103         (WebCore::DocumentStyleSheetCollection::addAuthorSheet): Add the stylesheet and force a style recalc.
2104         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Include author level styles.
2105         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): Include author styles.
2106         * dom/DocumentStyleSheetCollection.h:
2107         (WebCore::DocumentStyleSheetCollection::documentAuthorStyleSheets): Accessor.
2108         (DocumentStyleSheetCollection): Keep track of author styles added by script.
2109         * testing/Internals.cpp:
2110         (WebCore::Internals::insertAuthorCSS): Testing addAuthorSheet.
2111         (WebCore::Internals::insertUserCSS): Testing addUserSheet.
2112         * testing/Internals.h:
2113         * testing/Internals.idl: Add addAuthorSheet and addUserSheet.
2114
2115 2012-12-06  Elliott Sprehn  <esprehn@gmail.com>
2116
2117         Create only NodeRareDataBase when setting TreeScope
2118         https://bugs.webkit.org/show_bug.cgi?id=104202
2119
2120         Reviewed by Dimitri Glazkov.
2121
2122         Move many fields from NodeRareData into NodeRareDataBase and rename it
2123         UncommonNodeData and add a flag to determine if a UncommonNodeData is
2124         actually a full NodeRareData instance. By moving fields up from NodeRareData
2125         we ensure that this new flag in the base class doesn't make NodeRareData
2126         grow in size.
2127
2128         We then make setting the tree scope only allocate the UncommonNodeData
2129         instead of creating the full NodeRareData or ElementRareData. This is
2130         important because when putting nodes into ShadowRoot or any descendant
2131         we must associate the node with a tree scope which adds rare data to the
2132         node making NodeRareData and ElementRareData not very rare.
2133
2134         On 64bit, this reduces the overhead per element from 136 bytes to
2135         32 bytes for a 76% savings, and on other nodes from 64 bytes to 32 bytes
2136         for a 50% savings.
2137
2138         No new tests, no change in behavior.
2139
2140         * dom/Document.h:
2141         (WebCore::Node::treeScope):
2142         * dom/Element.cpp:
2143         (WebCore::Element::createRareData):
2144         * dom/ElementRareData.h:
2145         (ElementRareData):
2146         (WebCore::ElementRareData::ElementRareData):
2147         * dom/Node.cpp:
2148         (WebCore::Node::setTreeScope):
2149         (WebCore::Node::ensureRareData):
2150         (WebCore::Node::createRareData):
2151         (WebCore::Node::clearRareData):
2152         * dom/Node.h:
2153         (WebCore::UncommonNodeData::create):
2154         (UncommonNodeData):
2155         (WebCore::UncommonNodeData::~UncommonNodeData):
2156         (WebCore::UncommonNodeData::isNodeRareData):
2157         (WebCore::UncommonNodeData::UncommonNodeData):
2158         (WebCore::Node::renderer):
2159         (WebCore::Node::setRenderer):
2160         (Node):
2161         (WebCore::Node::hasRareData):
2162         (WebCore::Node::hasUncommonNodeData):
2163         * dom/NodeRareData.h:
2164         (WebCore::NodeRareData::NodeRareData):
2165         (NodeRareData):
2166
2167 2012-12-06  Joshua Bell  <jsbell@chromium.org>
2168
2169         IndexedDB: Remove IDBDatabaseException.idl
2170         https://bugs.webkit.org/show_bug.cgi?id=102961
2171
2172         Reviewed by Adam Barth.
2173
2174         Delete the IDL and references to it. No longer needed as a enum member
2175         in the autogenerated ExceptionCodeDescription.h so removed from the ".in"
2176         file; only direct references are retained in the autogenerated cpp file.
2177
2178         Ideally the code generator would handle these new-style DOMExceptions,
2179         but we don't have any other examples yet to know what pattern to follow.
2180
2181         No new tests - just removing dead code.
2182
2183         * CMakeLists.txt:
2184         * DerivedSources.cpp:
2185         * DerivedSources.make:
2186         * DerivedSources.pri:
2187         * GNUmakefile.list.am:
2188         * Modules/indexeddb/IDBDatabaseException.idl: Removed.
2189         * WebCore.gypi:
2190         * WebCore.vcproj/WebCore.vcproj:
2191         * WebCore.xcodeproj/project.pbxproj:
2192         * dom/DOMExceptions.in:
2193         * dom/make_dom_exceptions.pl:
2194         (generateImplementation):
2195
2196 2012-12-06  Andreas Kling  <akling@apple.com>
2197
2198         [Mac] Drain the CSSValuePool on memory pressure.
2199         <http://webkit.org/b/104274>
2200
2201         Reviewed by Antti Koivisto.
2202
2203         Add a drain() mechanism to CSSValuePool and call it when we're under memory pressure.
2204
2205         * WebCore.xcodeproj/project.pbxproj:
2206         * css/CSSValuePool.cpp:
2207         (WebCore::CSSValuePool::drain):
2208         * css/CSSValuePool.h:
2209         * platform/mac/MemoryPressureHandlerMac.mm:
2210         (WebCore::MemoryPressureHandler::releaseMemory):
2211
2212 2012-12-05  Adam Klein  <adamk@chromium.org>
2213
2214         Remove gyp config for incomplete and unused Apple Mac gyp build
2215         https://bugs.webkit.org/show_bug.cgi?id=104068
2216
2217         Reviewed by Adam Barth.
2218
2219         As part of the removal, move some files to the proper sections
2220         of the gypi file.
2221
2222         * WebCore.gyp/WebCore.gyp:
2223         * WebCore.gypi:
2224
2225 2012-12-06  Hans Muller  <hmuller@adobe.com>
2226
2227         [CSS Exclusions] Add support for computing the first included interval position.
2228         https://bugs.webkit.org/show_bug.cgi?id=103327
2229
2230         Reviewed by Levi Weintraub.
2231
2232         If the first "word" in a line doesn't fit within the shape-inside when lineTop
2233         is the top of the shape's logical bounding box, adjust lineTop downwards to where
2234         the word fits.  Currently only rounded rectangle shapes are supported.
2235
2236         Added ExclusionShape::firstIncludedIntervalLogicalTop(). The new virtual method
2237         computes the topmost/leftmost location where a line segment with the specified
2238         minLogicalIntervalSize will fit within the exclusion shape and returns the
2239         corresponding logical Y coordinate.  The result is additionally constrained to
2240         be at or below minLogicalIntervalTop. If the segment will not fit anywhere within
2241         the shape, then false is returned.
2242
2243         During layout, minLogicalIntervalTop is the nominal top of the line being laid
2244         out within the exclusion shape.
2245
2246         RenderBlock::layoutRunsAndFloatsInRange() now calls a new ExclusionShapeInsideInfo
2247         method, adjustLogicalLineTop(), which uses firstIncludedIntervalLogicalTop() to
2248         decide if the logical top of the line has to be moved downwards, for the first
2249         word to fit within the exclusion shape.
2250
2251         Tests: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-001.html
2252                fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-002.html
2253
2254         * rendering/ExclusionPolygon.cpp:
2255         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This is a stub implementation.
2256         * rendering/ExclusionPolygon.h:
2257         * rendering/ExclusionRectangle.cpp:
2258         (WebCore::ellipseXIntercept): Added spaces to conform to webkit style and to be consistent with ellipseYIntercept()
2259         (WebCore::ellipseYIntercept): Compute an ellipse's Y intercept for an X coordinate.
2260         (WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): See the description above.
2261         * rendering/ExclusionRectangle.h:
2262         * rendering/ExclusionShape.h:
2263         (ExclusionShape):
2264         (WebCore::ExclusionShape::logicalTopForMinY): Internal to logical coordinate conversion.
2265         * rendering/ExclusionShapeInsideInfo.cpp:
2266         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): A new method that updates m_lineTop with firstIncludedIntervalPosition().
2267         * rendering/ExclusionShapeInsideInfo.h:
2268         (ExclusionShapeInsideInfo):
2269         (WebCore::ExclusionShapeInsideInfo::logicalLineTop): This is just a cover for the private m_lineTop field.
2270         * rendering/RenderBlockLineLayout.cpp:
2271         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added code that restarts the layout loop if it's necessary to adjust the line's logicalTop.
2272         (WebCore::RenderBlock::restartLayoutRunsAndFloatsInRange): Factored newly common code into this helper function.
2273
2274 2012-12-06  Ryosuke Niwa  <rniwa@webkit.org>
2275
2276         Use ownerNode() instead of base() in HTMLCollection
2277         https://bugs.webkit.org/show_bug.cgi?id=104244
2278
2279         Reviewed by Adam Barth.
2280
2281         Use ownerNode() instead of base() in HTMLCollection to match LiveNodeList.
2282         Notice that the definition of base(), which this patch removes, is "return ownerNode()".
2283
2284         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
2285         (WebCore::getNamedItems):
2286         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2287         (WebCore::JSHTMLOptionsCollection::indexSetter):
2288         (WebCore::JSHTMLOptionsCollection::remove):
2289         * bindings/scripts/CodeGeneratorJS.pm:
2290         (GenerateImplementation):
2291         * bindings/scripts/CodeGeneratorV8.pm:
2292         (GenerateOpaqueRootForGC):
2293         * bindings/scripts/IDLAttributes.txt:
2294         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
2295         (WebCore::getNamedItems):
2296         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2297         (WebCore::V8HTMLOptionsCollection::removeCallback):
2298         (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
2299         * dom/WebKitNamedFlow.cpp:
2300         (WebCore::WebKitNamedFlow::ownerNode):
2301         * dom/WebKitNamedFlow.h:
2302         (WebKitNamedFlow):
2303         * dom/WebKitNamedFlow.idl:
2304         * html/HTMLAllCollection.idl:
2305         * html/HTMLCollection.h:
2306         (HTMLCollection):
2307         * html/HTMLCollection.idl:
2308         * html/HTMLFormControlsCollection.cpp:
2309         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
2310         (WebCore::HTMLFormControlsCollection::create):
2311         (WebCore::HTMLFormControlsCollection::formControlElements):
2312         (WebCore::HTMLFormControlsCollection::formImageElements):
2313         (WebCore::HTMLFormControlsCollection::namedItem):
2314         (WebCore::HTMLFormControlsCollection::updateNameCache):
2315         * html/HTMLFormControlsCollection.idl:
2316         * html/HTMLNameCollection.cpp:
2317         (WebCore::HTMLNameCollection::~HTMLNameCollection):
2318         (WebCore::HTMLNameCollection::virtualItemAfter):
2319         * html/HTMLOptionsCollection.cpp:
2320         (WebCore::HTMLOptionsCollection::add):
2321         (WebCore::HTMLOptionsCollection::remove):
2322         (WebCore::HTMLOptionsCollection::selectedIndex):
2323         (WebCore::HTMLOptionsCollection::setSelectedIndex):
2324         (WebCore::HTMLOptionsCollection::setLength):
2325         * html/HTMLOptionsCollection.idl:
2326         * html/HTMLPropertiesCollection.cpp:
2327         (WebCore::HTMLPropertiesCollection::updateRefElements):
2328         (WebCore::HTMLPropertiesCollection::namedItem):
2329         * html/HTMLTableRowsCollection.cpp:
2330         (WebCore::HTMLTableRowsCollection::virtualItemAfter):
2331
2332 2012-12-06  Tommy Widenflycht  <tommyw@google.com>
2333
2334         Speech Recognition API: Change the error code to a string on SpeechRecognitionError
2335         https://bugs.webkit.org/show_bug.cgi?id=104254
2336
2337         Reviewed by Adam Barth.
2338
2339         SpeechRecognitionError::code (numeric value) has been changed to SpeechRecognitionError::error (string)
2340         in the latest specification.
2341
2342         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-error
2343
2344         Existing tests modified to cover this patch.
2345
2346         * Modules/speech/SpeechRecognitionError.cpp:
2347         (WebCore::ErrorCodeToString):
2348         (WebCore):
2349         (WebCore::SpeechRecognitionError::create):
2350         (WebCore::SpeechRecognitionError::SpeechRecognitionError):
2351         * Modules/speech/SpeechRecognitionError.h:
2352         (SpeechRecognitionErrorInit):
2353         (WebCore::SpeechRecognitionError::error):
2354         (SpeechRecognitionError):
2355         * Modules/speech/SpeechRecognitionError.idl:
2356
2357 2012-12-06  Stephen Chenney  <schenney@chromium.org>
2358
2359         SVG <use> element inside an svg-as-image fails
2360         https://bugs.webkit.org/show_bug.cgi?id=104007
2361
2362         Reviewed by Eric Seidel.
2363
2364         Upon redraw, SVGImage calls layout on the document it is drawing into
2365         the image if the image, provided it believes the redraw does not need
2366         to be delayed. Unfortunately, when an SVG <use> element is modified
2367         (by animation, say) and regenerates its shadow tree, the destructors
2368         invoke redraw, causing the SVGImage to call layout on something that
2369         is in the process of being deleted. That's bad.
2370
2371         This change causes SVGImage to always delay the redraw. It is the most robust
2372         way to protect against this problem, as there may be any number of
2373         ways to cause this issue (a node being deleted in an svg-as-image
2374         target) and this protects against them all.
2375
2376         The test case crashes in Asan Chromium.
2377
2378         Test: svg/as-image/animated-use-as-image-crash.html
2379
2380         * svg/graphics/SVGImageCache.cpp:
2381         (WebCore::SVGImageCache::imageContentChanged): Always redraw on the timer.
2382
2383 2012-12-06  Antoine Quint  <graouts@apple.com>
2384
2385         TextTrack's .cues not ordered correctly when two cues have the same .startTime
2386         https://bugs.webkit.org/show_bug.cgi?id=103266
2387
2388         Reviewed by Eric Carlson.
2389
2390         Adding a new method TextTrackCueList::updateCueIndex() to update the list of
2391         cues after changing the .startTime or .endTime of a TextTrackCue. I elected to
2392         add a new method to TextTrackCueList rather than calling remove() and then add()
2393         on the list from TextTrack::cueDidChange() so that the nature of the operation
2394         is abstracted and we can easily change the way we keep the cue list sorted at
2395         a later time should we choose to.
2396
2397         * html/track/TextTrack.cpp:
2398         (WebCore::TextTrack::cueDidChange):
2399         * html/track/TextTrackCueList.cpp:
2400         (WebCore::TextTrackCueList::updateCueIndex):
2401         (WebCore):
2402         * html/track/TextTrackCueList.h:
2403         (TextTrackCueList):
2404
2405 2012-12-06  Andras Becsi  <andras.becsi@digia.com>
2406
2407         [Qt][Mac] Fix libxslt and libxml2 config tests
2408         https://bugs.webkit.org/show_bug.cgi?id=104164
2409
2410         Reviewed by Simon Hausmann.
2411
2412         Since libxml2 is a dependency for libxslt and is not used
2413         standalone the configurations for it should also depend on
2414         whether XSLT is enabled.
2415         Also avoid using pkg-config on Mac, instead use direct
2416         include paths and add needed libraries to the linker.
2417
2418         No new tests needed.
2419
2420         * WebCore.pri:
2421
2422 2012-12-06  Shinya Kawanaka  <shinyak@chromium.org>
2423
2424         Internals.getElementByIdInShadowRoot is nonsense now.
2425         https://bugs.webkit.org/show_bug.cgi?id=104241
2426
2427         Reviewed by Kent Tamura.
2428
2429         Since we have ShadowRoot.getElementById() now, we don't need Internals.getElementByIdInShadowRoot, which is
2430         the same functionality of ShadowRoot.getElementById().
2431
2432         Test: fast/dom/shadow/get-element-by-id-in-shadow-root.html
2433
2434         * WebCore.exp.in:
2435         * testing/Internals.cpp:
2436         * testing/Internals.h:
2437         (Internals):
2438         * testing/Internals.idl:
2439
2440 2012-12-06  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2441
2442         [EFL] Active texture state gets corrupted after updating graphics surface contents.
2443         https://bugs.webkit.org/show_bug.cgi?id=104248.
2444
2445         Reviewed by Kenneth Rohde Christiansen.
2446
2447         GraphicsContext3DPrivate::copyToGraphicsSurface() doesn't restore the previously bound texture
2448         after copying texture contents. This corrupts the texture state.
2449
2450         Existing Tests should cover this.
2451
2452         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2453         (GraphicsContext3DPrivate::copyToGraphicsSurface):
2454         * platform/graphics/opengl/GLPlatformSurface.cpp:
2455         (WebCore::GLPlatformSurface::updateContents):
2456         * platform/graphics/opengl/GLPlatformSurface.h:
2457         (GLPlatformSurface):
2458
2459 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
2460
2461         Web Inspector: Goto panel shortcuts and description are reversed
2462         https://bugs.webkit.org/show_bug.cgi?id=103988
2463
2464         Reviewed by Pavel Feldman.
2465
2466         Swap the square brackets in the shortcuts.
2467
2468         * inspector/front-end/inspector.js:
2469         (WebInspector._registerShortcuts):
2470
2471 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2472
2473         Unreviewed, rolling out r136818.
2474         http://trac.webkit.org/changeset/136818
2475         https://bugs.webkit.org/show_bug.cgi?id=104249
2476
2477         simulatedClick does not work as per #chrmium irc. (Requested
2478         by hayato on #webkit).
2479
2480         * dom/EventDispatcher.cpp:
2481         (WebCore::EventRelatedTargetAdjuster::adjust):
2482         * dom/MouseEvent.cpp:
2483         (WebCore::MouseEventDispatchMediator::create):
2484         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
2485         (WebCore::MouseEventDispatchMediator::dispatchEvent):
2486         * dom/MouseEvent.h:
2487         (MouseEventDispatchMediator):
2488         * dom/Node.cpp:
2489         (WebCore::Node::dispatchEvent):
2490
2491 2012-12-06  Ulan Degenbaev  <ulan@chromium.org>
2492
2493         [v8] Fix hidden property name of V8ArrayBufferView flag.
2494         https://bugs.webkit.org/show_bug.cgi?id=104099
2495
2496         Reviewed by Kentaro Hara.
2497
2498         Fix hidden property name of V8ArrayBufferView hidden copy method.
2499
2500         * bindings/v8/V8HiddenPropertyName.h:
2501         (WebCore):
2502         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
2503         (WebCore::getHiddenCopyMethod):
2504         (WebCore::installHiddenCopyMethod):
2505
2506 2012-12-06  Kentaro Hara  <haraken@chromium.org>
2507
2508         Unreviewed. Fixed a wrong comment landed in r136822.
2509
2510         * bindings/v8/V8Binding.h:
2511         (WebCore):
2512
2513 2012-12-05  Kentaro Hara  <haraken@chromium.org>
2514
2515         [V8] Implement deprecatedV8String()
2516         https://bugs.webkit.org/show_bug.cgi?id=104230
2517
2518         Reviewed by Adam Barth.
2519
2520         To make an Isolate mandatory in v8String(), we implement
2521         deprecatedV8String() for call sites that don't have
2522         an Isolate. Eventually we want to kill the method though.
2523
2524         No tests. No change in behavior.
2525
2526         * bindings/scripts/test/V8/V8TestCallback.cpp:
2527         (WebCore::V8TestCallback::callbackWithClass2Param):
2528         * bindings/v8/Dictionary.cpp:
2529         (WebCore::Dictionary::getKey):
2530         * bindings/v8/IDBBindingUtilities.cpp:
2531         (WebCore::get):
2532         (WebCore::set):
2533         * bindings/v8/JavaScriptCallFrame.cpp:
2534         (WebCore::JavaScriptCallFrame::evaluate):
2535         * bindings/v8/ScriptController.cpp:
2536         (WebCore::ScriptController::compileAndRunScript):
2537         (WebCore::ScriptController::bindToWindowObject):
2538         (WebCore::ScriptController::disableEval):
2539         * bindings/v8/ScriptDebugServer.cpp:
2540         (WebCore::ScriptDebugServer::setBreakpoint):
2541         (WebCore::ScriptDebugServer::removeBreakpoint):
2542         (WebCore::ScriptDebugServer::setScriptSource):
2543         (WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled):
2544         (WebCore::ScriptDebugServer::compileScript):
2545         * bindings/v8/ScriptFunctionCall.cpp:
2546         (WebCore::ScriptCallArgumentHandler::appendArgument):
2547         (WebCore::ScriptFunctionCall::call):
2548         (WebCore::ScriptFunctionCall::construct):
2549         * bindings/v8/ScriptProfiler.cpp:
2550         (WebCore::ScriptProfiler::start):
2551         (WebCore::ScriptProfiler::stop):
2552         (WebCore::ScriptProfiler::takeHeapSnapshot):
2553         * bindings/v8/ScriptSourceCode.cpp:
2554         (WebCore::ScriptSourceCode::compileScript):
2555         * bindings/v8/V8Binding.h:
2556         (WebCore):
2557         (WebCore::deprecatedV8String):
2558         * bindings/v8/V8DOMWindowShell.cpp:
2559         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2560         (WebCore::V8DOMWindowShell::namedItemAdded):
2561         (WebCore::V8DOMWindowShell::namedItemRemoved):
2562         * bindings/v8/V8LazyEventListener.cpp:
2563         (WebCore::V8LazyEventListener::prepareListenerObject):
2564         * bindings/v8/V8WindowErrorHandler.cpp:
2565         (WebCore::V8WindowErrorHandler::callListenerFunction):
2566         * bindings/v8/V8WorkerContextErrorHandler.cpp:
2567         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
2568         * bindings/v8/WorkerScriptController.cpp:
2569         (WebCore::WorkerScriptController::evaluate):
2570         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
2571         (WebCore::installHiddenCopyMethod):
2572         (WebCore::copyElements):
2573         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
2574         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2575         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2576         (WebCore::V8InjectedScriptHost::getEventListenersCallback):
2577         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2578         (WebCore::InjectedScriptManager::createInjectedScript):
2579         * bindings/v8/custom/V8MessageEventCustom.cpp:
2580         (WebCore::V8MessageEvent::dataAccessorGetter):
2581         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2582         (WebCore::toV8Object):
2583         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
2584
2585 2012-12-06  Keishi Hattori  <keishi@webkit.org>
2586
2587         Page popup should align to the right when the anchor element is rtl
2588         https://bugs.webkit.org/show_bug.cgi?id=104219
2589
2590         Reviewed by Kent Tamura.
2591
2592         Page popup should align to the right edge of the anchor element when the anchor element is rtl.
2593
2594         No new tests. Mock page popup can't test popup window position.
2595
2596         * Resources/pagepopups/pickerCommon.js:
2597         (_adjustWindowRectHorizontally): Align to the right edge when anchor element is rtl. Removed some redundant lines.
2598         (setWindowRect): If the window is hidden we want to move first then resize so the popup doesn't flicker.
2599         (isWindowHidden): Returns true if the window is hidden using hideWindow().
2600
2601 2012-12-06  Kentaro Hara  <haraken@chromium.org>
2602
2603         [V8] Make an Isolate mandatory for v8StringOrNull() and v8StringOrUndefined()
2604         https://bugs.webkit.org/show_bug.cgi?id=104213
2605
2606         Reviewed by Adam Barth.
2607
2608         All call sites of v8StringOrNull() and v8StringOrUndefined() have an Isolate.
2609
2610         No tests. No change in behavior.
2611
2612         * bindings/v8/V8Binding.h:
2613         (WebCore::v8StringOrNull):
2614         (WebCore::v8StringOrUndefined):
2615
2616 2012-12-05  Kentaro Hara  <haraken@chromium.org>
2617
2618         [V8] Implement deprecatedV8Integer(int i)
2619         https://bugs.webkit.org/show_bug.cgi?id=104220
2620
2621         Reviewed by Adam Barth.
2622
2623         To make an Isolate mandatory in v8Integer(), we implement
2624         deprecatedV8Integer(int i) for call sites that don't have
2625         an Isolate. Eventually we want to kill deprecatedV8Integer(int i).
2626
2627         No new tests. No change in behavior.
2628
2629         * bindings/v8/Dictionary.cpp:
2630         (WebCore::Dictionary::get):
2631         * bindings/v8/NPV8Object.cpp:
2632         (_NPN_Enumerate):
2633         * bindings/v8/PageScriptDebugServer.cpp:
2634         (WebCore::PageScriptDebugServer::addListener):
2635         * bindings/v8/ScriptDebugServer.cpp:
2636         (WebCore::ScriptDebugServer::setBreakpoint):
2637         (WebCore::ScriptDebugServer::compileScript):
2638         * bindings/v8/ScriptSourceCode.cpp:
2639         (WebCore::ScriptSourceCode::compileScript):
2640         * bindings/v8/V8Binding.h:
2641         (WebCore):
2642         (WebCore::deprecatedV8Integer):
2643         * bindings/v8/V8DOMConfiguration.cpp:
2644         (WebCore::V8DOMConfiguration::batchConfigureConstants):
2645         * bindings/v8/V8NPUtils.cpp:
2646         (WebCore::convertNPVariantToV8Object):
2647         * bindings/v8/V8Utilities.cpp:
2648         (WebCore::createHiddenDependency):
2649         (WebCore::removeHiddenDependency):
2650         * bindings/v8/V8WindowErrorHandler.cpp:
2651         (WebCore::V8WindowErrorHandler::callListenerFunction):
2652         * bindings/v8/V8WorkerContextErrorHandler.cpp:
2653         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
2654         * bindings/v8/WorkerScriptDebugServer.cpp:
2655         (WebCore::WorkerScriptDebugServer::addListener):
2656         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
2657         (WebCore::V8MutationCallback::handleEvent):
2658
2659 2012-12-06  Hayato Ito  <hayato@chromium.org>
2660
2661         Event's relatedTarget re-targeting does not occur for manually fired mouse events created by event.initMouseEvent().
2662         https://bugs.webkit.org/show_bug.cgi?id=102681
2663
2664         Reviewed by Dimitri Glazkov.
2665
2666         Make sure that event's relatedTarget re-targeting occurs for mouse
2667         events created by event.initMouseEvent().  Since user-generated
2668         mouse events can have a relatedTarget which is same to the target
2669         node, the algorithm which calculates event's ancestors is also
2670         updated so that ancestors are not shrunk wrongly.
2671
2672         Test: fast/events/dispatch-synthetic-mouseevent.html
2673               fast/dom/shadow/shadow-dom-event-dispatching.html
2674
2675         * dom/EventDispatcher.cpp:
2676         (WebCore::EventRelatedTargetAdjuster::adjust):
2677         * dom/MouseEvent.cpp:
2678         (WebCore::MouseEventDispatchMediator::create):
2679         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
2680         (WebCore::MouseEventDispatchMediator::dispatchEvent):
2681         * dom/MouseEvent.h:
2682         (WebCore::MouseEventDispatchMediator::isSyntheticMouseEvent):
2683         (MouseEventDispatchMediator):
2684         * dom/Node.cpp:
2685         (WebCore::Node::dispatchEvent):
2686
2687 2012-12-06  Michael Pruett  <michael@68k.org>
2688
2689         [JSC] Check whether property is an array before attempting conversion to array in JSDictionary
2690         https://bugs.webkit.org/show_bug.cgi?id=96614
2691
2692         Reviewed by Kentaro Hara.
2693
2694         JSDictionary should check whether the property being accessed in get()
2695         is an array before attempting to convert the value to an array.
2696
2697         Previously calling get() with a result type of Vector<String> when
2698         the named property could not be converted to an array would generate
2699         an exception.
2700
2701         Tests: storage/indexeddb/*
2702
2703         * bindings/js/JSDictionary.cpp:
2704         (WebCore::JSDictionary::convertValue):
2705         * bindings/js/JSDictionary.h:
2706         (WebCore::JSDictionary::tryGetPropertyAndResult):
2707
2708 2012-12-05  Kentaro Hara  <haraken@chromium.org>
2709
2710         [V8] Pass Isolate to toDOMStringList()
2711         https://bugs.webkit.org/show_bug.cgi?id=104224
2712
2713         Reviewed by Adam Barth.
2714
2715         No tests. No change in behavior.
2716
2717         * bindings/scripts/CodeGeneratorV8.pm:
2718         (JSValueToNative):
2719         * bindings/scripts/test/V8/V8TestObj.cpp:
2720         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
2721         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
2722         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
2723         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
2724         * bindings/v8/V8Binding.cpp:
2725         (WebCore::toDOMStringList):
2726         * bindings/v8/V8Binding.h:
2727         (WebCore):
2728
2729 2012-12-06  Kentaro Hara  <haraken@chromium.org>
2730
2731         Remove JSDependentRetained.h and V8DependentRetained.h
2732         https://bugs.webkit.org/show_bug.cgi?id=104232
2733
2734         Reviewed by Adam Barth.
2735
2736         Although (JS|V8)DependentRetained.h were introduced for MutationObservers,
2737         they are not going to be used (See the discussion in bug 95519).
2738         We can remove them.
2739
2740         No tests. No change in behavior.
2741
2742         * GNUmakefile.list.am:
2743         * WebCore.gypi:
2744         * WebCore.vcproj/WebCore.vcproj:
2745         * WebCore.xcodeproj/project.pbxproj:
2746         * bindings/js/JSDependentRetained.h: Removed.
2747         * bindings/v8/V8DependentRetained.h: Removed.
2748         * bindings/v8/V8PerIsolateData.cpp:
2749         (WebCore::V8PerIsolateData::V8PerIsolateData):
2750         * bindings/v8/V8PerIsolateData.h:
2751         (V8PerIsolateData):
2752
2753 2012-12-06  Kentaro Hara  <haraken@chromium.org>
2754
2755         [V8] Replace v8String("symbol") with v8::String::NewSymbol("symbol")
2756         https://bugs.webkit.org/show_bug.cgi?id=104209
2757
2758         Reviewed by Adam Barth.
2759
2760         V8 can look up symbols faster than strings.
2761
2762         No tests. No change in behavior.
2763
2764         * bindings/v8/JavaScriptCallFrame.cpp:
2765         (WebCore::JavaScriptCallFrame::caller):
2766         (WebCore::JavaScriptCallFrame::sourceID):
2767         (WebCore::JavaScriptCallFrame::line):
2768         (WebCore::JavaScriptCallFrame::column):
2769         (WebCore::JavaScriptCallFrame::functionName):
2770         (WebCore::JavaScriptCallFrame::scopeChain):
2771         (WebCore::JavaScriptCallFrame::scopeType):
2772         (WebCore::JavaScriptCallFrame::thisObject):
2773         (WebCore::JavaScriptCallFrame::evaluate):
2774         (WebCore::JavaScriptCallFrame::restart):
2775         * bindings/v8/V8ThrowException.cpp:
2776         (WebCore::domExceptionStackGetter):
2777         (WebCore::domExceptionStackSetter):
2778         (WebCore::V8ThrowException::setDOMException):
2779         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
2780         (WebCore::V8InspectorFrontendHost::platformCallback):
2781         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
2782         (WebCore::V8JavaScriptCallFrame::typeAccessorGetter):
2783
2784 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
2785
2786         Unreviewed, rolling out r136784 and r136802.
2787         http://trac.webkit.org/changeset/136784
2788         http://trac.webkit.org/changeset/136802
2789         https://bugs.webkit.org/show_bug.cgi?id=104231
2790
2791         breaks chromium canary (Requested by morrita on #webkit).
2792
2793         * WebCore.gyp/WebCore.gyp:
2794         * WebCore.gypi:
2795         * platform/chromium/PlatformThemeChromiumLinux.cpp: Added.
2796         (WebCore):
2797         (WebCore::PlatformThemeChromiumLinux::setScrollbarColors):
2798         (WebCore::clamp):
2799         (WebCore::PlatformThemeChromiumLinux::saturateAndBrighten):
2800         (WebCore::PlatformThemeChromiumLinux::outlineColor):
2801         (WebCore::PlatformThemeChromiumLinux::paintArrowButton):
2802         * platform/chromium/PlatformThemeChromiumLinux.h: Added.
2803         (WebCore):
2804         (PlatformThemeChromiumLinux):
2805         (WebCore::PlatformThemeChromiumLinux::thumbInactiveColor):
2806         (WebCore::PlatformThemeChromiumLinux::thumbActiveColor):
2807         (WebCore::PlatformThemeChromiumLinux::trackColor):
2808         (WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux):
2809         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Added.
2810         (WebCore):
2811         (WebCore::ScrollbarTheme::nativeTheme):
2812         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
2813         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
2814         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
2815         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
2816         (WebCore::ScrollbarThemeChromiumLinux::shouldCenterOnThumb):
2817         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
2818         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
2819         * platform/chromium/ScrollbarThemeChromiumLinux.h: Added.
2820         (ScrollbarThemeChromiumLinux):
2821         * rendering/RenderThemeChromiumAndroid.cpp:
2822         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet):
2823         * rendering/RenderThemeChromiumAndroid.h:
2824         * rendering/RenderThemeChromiumLinux.cpp: Added.
2825         (WebCore):
2826         (WebCore::getWebThemeState):
2827         (WebCore::RenderThemeChromiumLinux::create):
2828         (WebCore::RenderTheme::themeForPage):
2829         (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
2830         (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
2831         (WebCore::RenderThemeChromiumLinux::systemColor):
2832         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
2833         (WebCore::RenderThemeChromiumLinux::controlSupportsTints):
2834         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionBackgroundColor):
2835         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionForegroundColor):
2836         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionBackgroundColor):
2837         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionForegroundColor):
2838         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionBackgroundColor):
2839         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionBackgroundColor):
2840         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionForegroundColor):
2841         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionForegroundColor):
2842         (WebCore::RenderThemeChromiumLinux::sliderTickSize):
2843         (WebCore::RenderThemeChromiumLinux::sliderTickOffsetFromTrackCenter):
2844         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
2845         (WebCore::RenderThemeChromiumLinux::supportsControlTints):
2846         (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
2847         (WebCore::RenderThemeChromiumLinux::caretBlinkIntervalInternal):
2848         (WebCore::RenderThemeChromiumLinux::setSelectionColors):
2849         (WebCore::RenderThemeChromiumLinux::paintCheckbox):
2850         (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
2851         (WebCore::RenderThemeChromiumLinux::paintRadio):
2852         (WebCore::RenderThemeChromiumLinux::setRadioSize):
2853         (WebCore::RenderThemeChromiumLinux::paintButton):
2854         (WebCore::RenderThemeChromiumLinux::paintTextField):
2855         (WebCore::RenderThemeChromiumLinux::paintMenuList):
2856         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
2857         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
2858         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
2859         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
2860         (WebCore::RenderThemeChromiumLinux::paintProgressBar):
2861         (WebCore::RenderThemeChromiumLinux::shouldOpenPickerWithF4Key):
2862         * rendering/RenderThemeChromiumLinux.h: Added.
2863         (WebCore):
2864         (RenderThemeChromiumLinux):
2865
2866 2012-12-05  Sankeerth V S  <sankeerth.vs@samsung.com>
2867
2868         Web Inspector: Title of "Record Timeline" status button on "Timeline
2869         Panel" should reflect the recording state.
2870         https://bugs.webkit.org/show_bug.cgi?id=104108
2871
2872         Reviewed by Alexander Pavlov.
2873
2874         Title should be toggled between "Record"/"Stop" to reflect current
2875         state of the Status bar button.
2876
2877         No new tests as UI related change.
2878
2879         * inspector/front-end/TimelinePanel.js:
2880         (WebInspector.TimelinePanel.prototype.get _toggleTimelineButtonClicked):
2881
2882 2012-12-03  Kent Tamura  <tkent@chromium.org>
2883
2884         INPUT_MULTIPLE_FIELDS_UI doesn't show digits well in RTL locales
2885         https://bugs.webkit.org/show_bug.cgi?id=103869
2886
2887         Reviewed by Hajime Morita.
2888
2889         We need to use display:inline elements to wrap sub-fields and static
2890         text in DateTimeEditElement children to apply the Unicode Bidi
2891         Algorithm.
2892
2893         Because we can't use display:inline-block for them, we can't specify
2894         min-width CSS property for them. We stop using customStyleForRenderer of
2895         sub-fields to specify each of their widths, and use
2896         customStyleForRenderer of DateTimeEditElement to specify the total
2897         required width. A sub-field width shrink and grow so that the width fits
2898         to the field value, and a DateTimeEditElement doesn't.
2899
2900         No new tests. Coverred by existing tests, especially
2901         fast/forms/datetime/datetime-appearance-l10n.html shows "23:59"
2902         correctly.
2903
2904         * css/html.css:
2905         (input::-webkit-datetime-edit-year-field):
2906         - Make this display:inline to apply the Unicode Bidi Algorithm.
2907         - Use padding instead of margin because of ease of width computation.
2908           Also, the focus apparance gets better by padding.
2909         - Don't allow to specify font property here because of ease of width
2910           computation.
2911         - Remove text-align:center. It doesn't work for display:inline.
2912         (input::-webkit-datetime-edit-text):
2913         - Make this display:inline to apply the Unicode Bidi Algorithm.
2914         - Don't allow to specify font property here because of ease of width
2915           computation.
2916
2917         * html/shadow/DateTimeEditElement.h:
2918         (DateTimeEditElement): Declare customStyleForRenderer.
2919         * html/shadow/DateTimeEditElement.cpp:
2920         (WebCore::DateTimeEditElement::DateTimeEditElement):
2921         Enable customStyleForRenderer.
2922         (WebCore::DateTimeEditElement::customStyleForRenderer):
2923         Compute required width with a font for this element and child maximum
2924         widths, and set it to min-width style.
2925         The resultant width value can be inaccurate if a page author specifies
2926         padding, border, margin, etc. to ::-webkit-datetime-edit-*-field or
2927         ::-webkit-datetime-edit-text. In such case, the page author should specify
2928         wider width to <input>.
2929
2930         * dom/Element.h:
2931         (Element): Add isDateTimeFieldElement to do static_cast<DateTimeFieldElement> safely.
2932         * dom/Element.cpp:
2933         (WebCore::Element::isDateTimeFieldElement): Added.
2934
2935         * html/shadow/DateTimeFieldElement.h:
2936         (DateTimeFieldElement): Declare isDateTimeFieldElement and maximumWidth.
2937         * html/shadow/DateTimeFieldElement.cpp:
2938         (WebCore::DateTimeFieldElement::isDateTimeFieldElement):
2939         Added. Returns true.
2940         (WebCore::DateTimeFieldElement::maximumWidth):
2941         Added. Returns padding width.
2942
2943         * html/shadow/DateTimeSymbolicFieldElement.h:
2944         (DateTimeSymbolicFieldElement):
2945         Remove customStyleForRenderer, and declare maximumWidth.
2946         * html/shadow/DateTimeSymbolicFieldElement.cpp:
2947         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
2948         Disable customStyleForRenderer.
2949         (WebCore::DateTimeSymbolicFieldElement::maximumWidth):
2950         Added. Returns the expected maximum width with the specified font.
2951
2952         * html/shadow/DateTimeNumericFieldElement.h:
2953         (DateTimeNumericFieldElement):
2954         Remove customStyleForRenderer, declare maximumWidth, and make m_placeholder
2955         non-const because it is updated in the constructor.
2956         * html/shadow/DateTimeNumericFieldElement.cpp:
2957         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
2958         Disable customStyleForRenderer.
2959         If a numeric value for this field is LTR and the whole direction is RTL,
2960         wrap the placeholder string with left-to-right-mark and
2961         right-to-left-mark so that it is handled as LTR. Without this,
2962         sub-fields order would be changed when the content of a field is changed
2963         from a placeholder to a numeric value.
2964         (WebCore::DateTimeNumericFieldElement::maximumWidth):
2965         Added. Returns the expected maximum width with the specified font.
2966
2967 2012-12-05  Kent Tamura  <tkent@chromium.org>
2968
2969         INPUT_MULTIPLE_FIELDS_UI: The hour, am/pm, millisecond fields should support read-only state correctly
2970         https://bugs.webkit.org/show_bug.cgi?id=104210
2971
2972         Reviewed by Kentaro Hara.
2973
2974         1. The hour, am/pm, and millisecond fields should have CSS rules for
2975            [readonly]. They should be gray when they are read-only.
2976         2. The am/pm field should reject to set an empty value like other
2977            numeric fields do.
2978
2979         Tests: Add test cases to fast/forms/time/time-appearance-basic.html.
2980
2981         * css/html.css: merge existing readonly rules, and add ampm, hour, and
2982         millisecond pseudo classes.
2983         * html/shadow/DateTimeSymbolicFieldElement.cpp:
2984         (WebCore::DateTimeSymbolicFieldElement::setEmptyValue):
2985         Reject to set empty value if it is read-only.
2986
2987 2012-12-05  Dan Beam  <dbeam@chromium.org>
2988
2989         HTMLFormElement#requestAutocomplete() should require a user action
2990         https://bugs.webkit.org/show_bug.cgi?id=102320
2991
2992         Reviewed by Kent Tamura.
2993
2994         This patch dispatches an autocompleteerror when HTMLFormElement::requestAutocomplete() is called while not processing
2995         a user gesture.
2996
2997         * fast/forms/form-request-autocomplete.html is updated.
2998
2999         * html/HTMLFormElement.cpp:
3000         (WebCore::HTMLFormElement::requestAutocomplete):
3001
3002         Asynchronously dispatch an autocomplete error when not processing a user action when
3003         HTMLFormElement#requestAutocomplete() is invoked.
3004
3005 2012-12-05  Kentaro Hara  <haraken@chromium.org>
3006
3007         [V8] Optimize v8StringOrNull() and v8StringOrUndefined()
3008         https://bugs.webkit.org/show_bug.cgi?id=104206
3009
3010         Reviewed by Adam Barth.
3011
3012         Currently v8StringOrNull() and v8StringOrUndefined() are checking
3013         a null string twice. It is redundant.
3014
3015         [div.localName]
3016         Before this patch: 20.03 ns
3017         After this patch:  19.34 ns
3018
3019         * bindings/v8/V8Binding.h:
3020         (WebCore::v8StringOrNull):
3021         (WebCore::v8StringOrUndefined):
3022
3023 2012-12-05  Kentaro Hara  <haraken@chromium.org>
3024
3025         [V8] Optimize v8String() for uninitialized DOM attributes
3026         https://bugs.webkit.org/show_bug.cgi?id=104205
3027
3028         Reviewed by Adam Barth.
3029
3030         This patch makes uninitialized div.lang, div.title etc 6.3% faster.
3031
3032         [div.lang]
3033         Before this patch: 12.6 ns
3034         After this patch:  11.8 ns
3035
3036         * bindings/v8/V8Binding.h:
3037         (WebCore::v8String):
3038
3039 2012-12-05  Kentaro Hara  <haraken@chromium.org>
3040
3041         [V8] Remove addImplicitReferencesForNodeWithEventListeners()
3042         https://bugs.webkit.org/show_bug.cgi?id=104203
3043
3044         Reviewed by Adam Barth.
3045
3046         We can use opaqueRootForGC() instead. By this change, we can remove
3047         all AddImplicitReferences() from V8 bindings.
3048
3049         Tests: fast/dom/gc-image-element.html
3050                fast/dom/gc-image-element-2.html
3051                fast/dom/inline-event-attributes-lookup-removed.html
3052
3053         * bindings/v8/V8GCController.cpp:
3054
3055 2012-12-05  Andrei Bucur  <abucur@adobe.com>
3056
3057         [CSS Regions] Blocks don't relayout children if the width of a region changes
3058         https://bugs.webkit.org/show_bug.cgi?id=103993
3059
3060         Reviewed by David Hyatt.
3061
3062         After r135750 lines are no longer invalidating when regions change width. This is happening because the detection for the width change was being done
3063         only at line layout time. This patch moves the line relayout decision to the containing block by setting the relayoutChildren flag if the block
3064         has no region chain attached.
3065
3066         Tests: fast/regions/region-width-change-relayout-1.html
3067                fast/regions/region-width-change-relayout-2.html
3068                fast/regions/region-width-change-relayout-3.html
3069
3070         * rendering/RenderFlowThread.cpp:
3071         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
3072
3073 2012-12-05  Kihong Kwon  <kihong.kwon@samsung.com>
3074
3075         Parameter event need to covert to RefPtr in the DeviceController::dispatchDeviceEvent
3076         https://bugs.webkit.org/show_bug.cgi?id=104201
3077
3078         Reviewed by Laszlo Gombos.
3079
3080         Parameter 'event' need to covert to RefPtr in the DeviceController::dispatchDeviceEvent.
3081         This can make crash sometimes.
3082
3083         No new tests. Covered by existing layout tests.
3084
3085         * page/DeviceController.cpp:
3086         (WebCore::DeviceController::dispatchDeviceEvent):
3087
3088 2012-12-05  Halton Huo  <halton.huo@intel.com>
3089
3090         [CMake] Unify coding style for CMake files
3091         https://bugs.webkit.org/show_bug.cgi?id=103605
3092
3093         Reviewed by Laszlo Gombos.
3094
3095         Update cmake files(.cmake, CMakeLists.txt) with following style rules:
3096         1. Indentation
3097         1.1 Use spaces, not tabs.
3098         1.2 Four spaces as indent.
3099         2. Spacing
3100         2.1 Place one space between control statements and their parentheses.
3101             For eg, if (), else (), elseif (), endif (), foreach (),
3102             endforeach (), while (), endwhile (), break ().
3103         2.2 Do not place spaces between function and macro statements and
3104             their parentheses. For eg, macro(), endmacro(), function(),
3105             endfunction().
3106         2.3 Do not place spaces between a command or function or macro and its
3107             parentheses, or between a parenthesis and its content. For eg,
3108             message("testing") not message( "testing") or message ("testing" )
3109         2.4 No space at line ending.
3110         3. Lowercase when call commands macros and functions. For eg,
3111            add_executable() not ADD_EXECUTABLE(), set() not SET().
3112
3113         * CMakeLists.txt:
3114         * PlatformBlackBerry.cmake:
3115         * PlatformEfl.cmake:
3116         * PlatformWinCE.cmake:
3117         * UseJSC.cmake:
3118         * UseV8.cmake:
3119
3120 2012-12-05  Kentaro Hara  <haraken@chromium.org>
3121
3122         [V8] Remove unused property names from V8HiddenPropertyName
3123         https://bugs.webkit.org/show_bug.cgi?id=104194
3124
3125         Reviewed by Adam Barth.
3126
3127         We can remove unused property names from V8HiddenPropertyName.
3128
3129         No tests. No change in behavior.
3130
3131         * bindings/v8/V8HiddenPropertyName.h:
3132         (WebCore):
3133
3134 2012-12-05  Greg Billock  <gbillock@google.com>
3135
3136         Add runtime enable for web intents.
3137         https://bugs.webkit.org/show_bug.cgi?id=103669
3138
3139         Reviewed by Adam Barth.
3140
3141         Make web intents Javascript API enabled by a runtime setting.
3142
3143         * Modules/intents/DOMWindowIntents.idl:
3144         * Modules/intents/NavigatorIntents.idl:
3145         * bindings/generic/RuntimeEnabledFeatures.cpp:
3146         (WebCore):
3147         * bindings/generic/RuntimeEnabledFeatures.h:
3148         (RuntimeEnabledFeatures):
3149         (WebCore::RuntimeEnabledFeatures::webkitStartActivityEnabled):
3150         (WebCore::RuntimeEnabledFeatures::webkitIntentEnabled):
3151         (WebCore::RuntimeEnabledFeatures::webKitIntentEnabled):
3152         (WebCore::RuntimeEnabledFeatures::setWebIntentsEnabled):
3153
3154 2012-12-05  Scott Violet  <sky@chromium.org>
3155
3156         [chromium] Remove linux theme related files and switch to default
3157         https://bugs.webkit.org/show_bug.cgi?id=103897
3158
3159         Reviewed by Tony Chang.
3160
3161         Linux related theme files are now named Default.
3162
3163         No new tests, code cleanup.
3164
3165         * WebCore.gyp/WebCore.gyp: Update files
3166         * WebCore.gypi: Update files
3167         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
3168         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
3169         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
3170         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
3171         * rendering/RenderThemeChromiumAndroid.cpp:
3172         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet): Linux->Default
3173         * rendering/RenderThemeChromiumAndroid.h: Change superclass
3174         * rendering/RenderThemeChromiumLinux.cpp: Removed.
3175         * rendering/RenderThemeChromiumLinux.h: Removed.
3176
3177 2012-12-05  Joshua Bell  <jsbell@chromium.org>
3178
3179         IndexedDB: Allow multiple transactions to interleave request execution
3180         https://bugs.webkit.org/show_bug.cgi?id=97570
3181
3182         Reviewed by Tony Chang.
3183
3184         Implement spec logic for allowing read-only transactions, and read-write transactions
3185         with non-overlapping scopes, to run concurrently. Transactions all still run in the
3186         same thread with tasks triggered via timers, so tasks and the underlying database
3187         operations are interleaved rather than truly parallelized.
3188
3189         Within IDBTransactionCoordinator, rename started->queued, running->started to match
3190         spec terminology and clear up confusion.
3191
3192         Test: storage/indexeddb/transaction-coordination-across-databases.html
3193               storage/indexeddb/transaction-coordination-within-database.html
3194               storage/indexeddb/transaction-readwrite-exclusive.html
3195               storage/indexeddb/transaction-scope-sequencing.html
3196               storage/indexeddb/transaction-starvation.html
3197
3198         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Use IDBTransaction::Mode enum
3199         (WebCore::IDBDatabaseBackendImpl::createTransaction):
3200         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Ditto.
3201         (IDBDatabaseBackendImpl):
3202         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Ditto.
3203         (IDBDatabaseBackendInterface):
3204         * Modules/indexeddb/IDBTransactionBackendImpl.cpp: Convert scope as a HashSet for
3205         fast intersecting.
3206         (WebCore::IDBTransactionBackendImpl::create):
3207         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
3208         * Modules/indexeddb/IDBTransactionBackendImpl.h:
3209         (IDBTransactionBackendImpl):
3210         (WebCore::IDBTransactionBackendImpl::mode):
3211         (WebCore::IDBTransactionBackendImpl::scope):
3212         * Modules/indexeddb/IDBTransactionCoordinator.cpp: Spec logic goes here.
3213         (WebCore::IDBTransactionCoordinator::processStartedTransactions): Extend this
3214         method to test all plausibly runnable transactions.
3215         (WebCore):
3216         (WebCore::IDBTransactionCoordinator::canRunTransaction): Test to see if one
3217         particular transaction can be run.
3218         (WebCore::IDBTransactionCoordinator::doScopesOverlap): Do a quick intersection
3219         test between transaction scopes.
3220         * Modules/indexeddb/IDBTransactionCoordinator.h:
3221         (IDBTransactionCoordinator):
3222
3223 2012-12-05  No'am Rosenthal  <noam@webkit.org>
3224
3225         Coordinated Graphics: Enable support for setContentsToBackgroundColor
3226         https://bugs.webkit.org/show_bug.cgi?id=104128
3227
3228         Reviewed by Kenneth Rohde Christiansen.
3229
3230         Enable background color in GraphicsLayerTextureMapper, and paint it using TextureMapper::drawSolidColor.
3231         Once https://bugs.webkit.org/show_bug.cgi?id=103786 is enabled, this would enable Qt/GTK/EFL to directly
3232         composite colors that only have a background color, without having to create a backing store for them.
3233         This would eliminate the memory usage for those layers, reduce the time needed for them to draw into the
3234         backing store and upload the texture, and in the future allow direct compositing of things other than
3235         background colors.
3236
3237         Compositing tests cover this, but are still skipped for ports using coordinated graphics. 
3238         See https://bugs.webkit.org/show_bug.cgi?id=104129.
3239
3240         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3241         (WebCore::GraphicsLayerTextureMapper::setContentsToBackgroundColor):
3242         (WebCore::GraphicsLayerTextureMapper::backgroundColor):
3243             Maintain a backgroundColor member variable in GraphicsLayerTextureMapper
3244
3245         * platform/graphics/texmap/TextureMapperGL.cpp:
3246         (WebCore::TextureMapperGL::drawSolidColor):
3247             TextureMapperGL::drawSolidColor should allow blending when the solid color has alpha.
3248
3249         * platform/graphics/texmap/TextureMapperLayer.cpp:
3250         (WebCore::TextureMapperLayer::paintSelf):
3251         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
3252         * platform/graphics/texmap/TextureMapperLayer.h:
3253         (State):
3254
3255 2012-12-05  Kentaro Hara  <haraken@chromium.org>
3256
3257         Unreviewed, rolling out r136481.
3258         http://trac.webkit.org/changeset/136481
3259         https://bugs.webkit.org/show_bug.cgi?id=103868
3260
3261         it might have regressed dom_perf/CloneNodes (See bug 104177)
3262
3263         * dom/ContainerNodeAlgorithms.h:
3264         (ChildNodeInsertionNotifier):
3265         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
3266         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
3267         (WebCore::ChildNodeInsertionNotifier::notify):
3268
3269 2012-12-05  David Grogan  <dgrogan@chromium.org>
3270
3271         IndexedDB: Abort transactions because of leveldb errors part 3
3272         https://bugs.webkit.org/show_bug.cgi?id=103960
3273
3274         Reviewed by Tony Chang.
3275
3276         Transactions are aborted when there are leveldb problems creating
3277         indexes on an object store with existing data or when adding data to an
3278         objectstore that has indexes.
3279
3280         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3281         (WebCore):
3282         (WebCore::makeIndexWriters):
3283         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
3284         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
3285
3286 2012-12-05  Simon Fraser  <simon.fraser@apple.com>
3287
3288         Fix some repaint/paintCounter confusion, and reset it when getting layers out of the layer pool
3289         https://bugs.webkit.org/show_bug.cgi?id=104180
3290
3291         Reviewed by Tim Horton.
3292
3293         Layers retrieved from the LayerPool by TileCache need to have their
3294         repaint counters reset, otherwise the scroll performance logging gets
3295         confused.
3296         
3297         Also, the counter counts paints, not repaints (invalidations), so
3298         rename it accordingly.
3299
3300         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3301         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea): Whitespace fix.
3302         * platform/graphics/GraphicsLayer.h:
3303         * platform/graphics/ca/mac/TileCache.mm:
3304         (WebCore::TileCache::blankPixelCountForTiles):
3305         (WebCore::TileCache::createTileLayer):
3306         (WebCore::TileCache::drawRepaintCounter):
3307         * platform/graphics/ca/mac/WebTileLayer.h:
3308         * platform/graphics/ca/mac/WebTileLayer.mm:
3309         (-[WebTileLayer resetPaintCount]):
3310         (-[WebTileLayer incrementPaintCount]):
3311         (-[WebTileLayer paintCount]):
3312         (-[WebTileLayer logFilledFreshTile]):
3313
3314 2012-12-05  Oliver Hunt  <oliver@apple.com>
3315
3316         Empty parse cache when receiving a low memory warning
3317         https://bugs.webkit.org/show_bug.cgi?id=104161
3318
3319         Reviewed by Filip Pizlo.
3320
3321         Use new discardAllCode() function on the global data, rather than
3322         directly interacting with the heap.
3323
3324         * bindings/js/GCController.cpp:
3325         (WebCore::GCController::discardAllCompiledCode):
3326
3327 2012-12-05  Dan Bernstein  <mitz@apple.com>
3328
3329         Text decorations are rotated when text-combine takes effect
3330         https://bugs.webkit.org/show_bug.cgi?id=104172
3331
3332         Reviewed by Dave Hyatt.
3333
3334         Test: fast/text/decorations-with-text-combine.html
3335
3336         * rendering/InlineTextBox.cpp:
3337         (WebCore::InlineTextBox::paint): Applied a rotation to the graphics context when painting
3338         the text decorations for combined text.
3339
3340 2012-12-05  Justin Novosad  <junov@google.com>
3341
3342         [skia] Improve performance of GraphicsContext::createCompatibleBuffer by using SkDevice:createCompatibleDevice
3343         https://bugs.webkit.org/show_bug.cgi?id=103896
3344
3345         Reviewed by Stephen White.
3346
3347         Refactored GraphicsContext::createCompatibleBuffer (platform common
3348         code) to use platform-specific implementations provided by ImageBuffer.
3349         There is no change in behavior for non-skia ports. The skia
3350         implementation uses skia'a own createCompatibleDevice implementation,
3351         which offers several performance benefits:
3352         1. For accelerated contexts, the backing store may be allocated from
3353         the scratch texture pool, which minimizes texture allocation and
3354         deallocation overhead.
3355         2. The backing store will not be initially cleared if it is known
3356         in advance that fully opaque contents will be drawn into the buffer.
3357         3. For non-accelerated contexts, if the backing store is flagged as
3358         opaque, faster blitter loop implementations will be used for drawing
3359         the buffer contents into other buffers. (e.g. generated opaque gradient
3360         fills)
3361
3362         No new tests: covered by existing layout tests 
3363
3364         * platform/graphics/Generator.h:
3365         (Generator):
3366         Added hasAlpha method so that it can be used by GeneratorGeneratedImage
3367         * platform/graphics/GeneratorGeneratedImage.cpp:
3368         (WebCore::GeneratorGeneratedImage::drawPattern):
3369         Passing m_generator->hasAlpha() to createCompatibleBuffer in order to
3370         take advantage of optimizations that apply to opaque buffers.
3371         * platform/graphics/Gradient.h:
3372         (Gradient):
3373         Made hasAlpha virtual so that it now overrides Generator::hasAlpha
3374         * platform/graphics/GraphicsContext.cpp:
3375         (WebCore::GraphicsContext::createCompatibleBuffer):
3376         Refactored to use platform-specific implementation
3377         * platform/graphics/GraphicsContext.h:
3378         * platform/graphics/ImageBuffer.cpp:
3379         (WebCore::createCompatibleBuffer):
3380         Non-skia implementation. Mimics old
3381         GraphicsContext::createCompatibleBuffer
3382         * platform/graphics/ImageBuffer.h:
3383         (ImageBuffer):
3384         New skia-specific constructor
3385         * platform/graphics/skia/ImageBufferSkia.cpp:
3386         (WebCore::ImageBuffer::createCompatibleBuffer):
3387         (WebCore::ImageBuffer::ImageBuffer):
3388         * platform/graphics/skia/PlatformContextSkia.cpp:
3389         (WebCore::PlatformContextSkia::createCompatibleDevice):
3390         (WebCore):
3391         * platform/graphics/skia/PlatformContextSkia.h:
3392         (PlatformContextSkia):
3393
3394 2012-12-05  Alexis Menard  <alexis@webkit.org>
3395
3396         REGRESSION (r136683): css3/calc/background-position-parsing.html failing on EFL Linux 64-bit Debug WK2
3397         https://bugs.webkit.org/show_bug.cgi?id=104131
3398
3399         Reviewed by Antti Koivisto.
3400
3401         css3/calc/background-position-parsing.html assert in debug because we
3402         call CSSParser::validUnit multiple times in a row. The problem was with
3403         validUnit which check calc() values and save the result inside
3404         m_parsedCalculation for later usage. validUnit expects you to
3405         use m_parsedCalculation therefore calling validUnit again with
3406         m_parsedCalculation being set asserts. As parseFillBackgroundPosition
3407         just want to check wether the current value is maybe valid for
3408         background-position we can just relax the check to allow either the
3409         valid keywords or any other units (we will anyway filter the incorrect
3410         values later in the parsing). The most important check at this point
3411         for the shorthand is the validity of the keyword.
3412
3413         No new tests : the assert was covered by css3/calc/background-position-parsing.html.
3414
3415         * css/CSSParser.cpp:
3416         (WebCore::CSSParser::isPotentialPositionValue):
3417         (WebCore::CSSParser::parseFillBackgroundPosition):
3418         * css/CSSParser.h:
3419
3420 2012-12-05  Stephen White  <senorblanco@chromium.org>
3421
3422         Unreviewed, rolling out r136735.
3423         http://trac.webkit.org/changeset/136735
3424         https://bugs.webkit.org/show_bug.cgi?id=102699
3425
3426         Broke Chrome/Win build.
3427
3428         * platform/chromium/PlatformSupport.h:
3429         (PlatformSupport):