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