ee1c7cc5b572e13be9103eb354b8ef814b6d5a5d
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-12-15  Yongjun Zhang  <yongjun_zhang@apple.com>
2
3         PODIntervalTree takes 1.7MB memory on www.nytimes.com.
4         https://bugs.webkit.org/show_bug.cgi?id=73712
5
6         Reviewed by Kenneth Russell.
7
8         For a RenderBlock which has floating objects inside, we will create a PODIntervalTree and a PODArena with
9         at least one 16KB chunk.  A page could have a large number of such RenderBlocks and they could take huge
10         amount of memory.  To fix that, we can create a shared PODArena in the root RenderView.  Instead of having
11         their own PODArena, each RenderBlock with floating objects could share this PODArena to reduce memory consumption.
12
13         The shared PODArena could grow unboundedly if we keep removing and adding floating objects.  We can fix that
14         by reusing the freed memory in each chunk.  However, a PODArena could allocate objects of different sizes and
15         it would be complex to keep track of the size for each allocation in PODArena.  To address that, this patch
16         added class PODFreeListArena<T> which only allocates objects of type T (hence the same size).  We can then use a
17         free list to track freed nodes inside the chunk and reuse the free nodes in future allocations.
18
19         Manually tested on nytimes.com and the heap consumption of PODIntervalTree reduced from 1.7MB to 16KB. Performance
20         doesn't regress on test PerformanceTests/Layout/floats.html.
21
22         * WebCore.xcodeproj/project.pbxproj: add new header file PODFreeListArena.h.
23         * platform/PODArena.h:
24         (WebCore::PODArena::~PODArena): change dtor to virtual.
25         (WebCore::PODArena::Chunk::~Chunk): ditto.
26         * platform/PODFreeListArena.h: Added.
27         (WebCore::PODFreeListArena::create): 
28         (WebCore::PODFreeListArena::allocateObject): allocate an object.
29         (WebCore::PODFreeListArena::freeObject): free an object, find the right chunk and update its free list.
30         (WebCore::PODFreeListArena::allocate): allocate memory from the free list or current chunk.
31         (WebCore::PODFreeListArena::FreeListChunk::FreeListChunk): add m_freeList to track freed cells.
32         (WebCore::PODFreeListArena::FreeListChunk::allocate): reuse a free cell if there is one.
33         (WebCore::PODFreeListArena::FreeListChunk::free): make the memory taken by this object is free, and link it to m_freeList.
34         (WebCore::PODFreeListArena::FreeListChunk::contains): check if a pointer is inside this chunk.
35         (WebCore::PODFreeListArena::FreeListChunk::hasFreeList): check if this chunk has free cells.
36         * platform/PODRedBlackTree.h:
37         (WebCore::PODRedBlackTree::PODRedBlackTree): take PODFreeListArena instead of PODArena, since nodes of a particular PODRedBlackTree
38             is always of the same size.
39         (WebCore::PODRedBlackTree::clear): mark all nodes before clearing the tree.
40         (WebCore::PODRedBlackTree::initIfNeeded): add initIfNeeded to take an external PODFreeListArena.
41         (WebCore::PODRedBlackTree::add):
42         (WebCore::PODRedBlackTree::deleteNode): mark the node free in arena after it is removed from the tree.
43         (WebCore::PODRedBlackTree::markFree): mark all node free in the tree.
44         * rendering/RenderBlock.cpp:
45         (WebCore::RenderBlock::insertFloatingObject):
46         (WebCore::RenderBlock::addOverhangingFloats):
47         (WebCore::RenderBlock::addIntrudingFloats):
48         (WebCore::RenderBlock::FloatingObjects::computePlacedFloatsTree):  passing the shared PODFreeListArena to m_placedFloatsTree.
49         * rendering/RenderBlock.h:
50         (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
51         * rendering/RenderView.cpp:
52         (WebCore::RenderView::intervalArena): create the shared PODFreeListArena lazily.
53         * rendering/RenderView.h:
54
55 2011-12-15  Tony Chang  <tony@chromium.org>
56
57         Unreviewed, rollout r102825 because it didn't improve performance.
58         https://bugs.webkit.org/show_bug.cgi?id=74622
59
60         * css/CSSStyleSelector.cpp:
61         (WebCore::CSSStyleSelector::styleForElement):
62         (WebCore::CSSStyleSelector::pseudoStyleForElement):
63
64 2011-12-15  Ryosuke Niwa  <rniwa@webkit.org>
65
66         sizeof(RenderObject) is 32 instead of 24 on Windows
67         https://bugs.webkit.org/show_bug.cgi?id=74646
68
69         Reviewed by Darin Adler.
70
71         Make all bitfields in RenderObject to unsigned and wrap them around by RenderObjectBitfields.
72         Also add a compilation time assertion to make sure we won't grow RenderObject's size unintentionally.
73
74         * rendering/RenderBlock.cpp:
75         (WebCore::RenderBlock::layoutBlock):
76         (WebCore::RenderBlock::layoutBlockChild):
77         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
78         (WebCore::RenderBlock::layoutColumns):
79         * rendering/RenderBlock.h:
80         (WebCore::RenderBlock::FloatWithRect::FloatWithRect):
81         * rendering/RenderObject.cpp:
82         (WebCore::SameSizeAsRenderObject::~SameSizeAsRenderObject):
83         (WebCore::RenderObject::RenderObject):
84         (WebCore::RenderObject::markContainingBlocksForLayout):
85         (WebCore::RenderObject::setPreferredLogicalWidthsDirty):
86         (WebCore::RenderObject::invalidateContainerPreferredLogicalWidths):
87         (WebCore::RenderObject::styleWillChange):
88         (WebCore::RenderObject::styleDidChange):
89         (WebCore::RenderObject::willBeDestroyed):
90         (WebCore::RenderObject::updateDragState):
91         * rendering/RenderObject.h:
92         (WebCore::RenderObject::hasCounterNodeMap):
93         (WebCore::RenderObject::setHasCounterNodeMap):
94         (WebCore::RenderObject::childrenInline):
95         (WebCore::RenderObject::setChildrenInline):
96         (WebCore::RenderObject::hasColumns):
97         (WebCore::RenderObject::setHasColumns):
98         (WebCore::RenderObject::inRenderFlowThread):
99         (WebCore::RenderObject::setInRenderFlowThread):
100         (WebCore::RenderObject::isAnonymous):
101         (WebCore::RenderObject::setIsAnonymous):
102         (WebCore::RenderObject::isAnonymousBlock):
103         (WebCore::RenderObject::isFloating):
104         (WebCore::RenderObject::isPositioned):
105         (WebCore::RenderObject::isRelPositioned):
106         (WebCore::RenderObject::isText):
107         (WebCore::RenderObject::isBox):
108         (WebCore::RenderObject::isInline):
109         (WebCore::RenderObject::isDragging):
110         (WebCore::RenderObject::isReplaced):
111         (WebCore::RenderObject::isHorizontalWritingMode):
112         (WebCore::RenderObject::hasLayer):
113         (WebCore::RenderObject::hasBoxDecorations):
114         (WebCore::RenderObject::needsLayout):
115         (WebCore::RenderObject::selfNeedsLayout):
116         (WebCore::RenderObject::needsPositionedMovementLayout):
117         (WebCore::RenderObject::needsPositionedMovementLayoutOnly):
118         (WebCore::RenderObject::posChildNeedsLayout):
119         (WebCore::RenderObject::needsSimplifiedNormalFlowLayout):
120         (WebCore::RenderObject::normalChildNeedsLayout):
121         (WebCore::RenderObject::preferredLogicalWidthsDirty):
122         (WebCore::RenderObject::hasOverflowClip):
123         (WebCore::RenderObject::hasTransform):
124         (WebCore::RenderObject::node):
125         (WebCore::RenderObject::setPositioned):
126         (WebCore::RenderObject::setRelPositioned):
127         (WebCore::RenderObject::setFloating):
128         (WebCore::RenderObject::setInline):
129         (WebCore::RenderObject::setHasBoxDecorations):
130         (WebCore::RenderObject::setIsText):
131         (WebCore::RenderObject::setIsBox):
132         (WebCore::RenderObject::setReplaced):
133         (WebCore::RenderObject::setHorizontalWritingMode):
134         (WebCore::RenderObject::setHasOverflowClip):
135         (WebCore::RenderObject::setHasLayer):
136         (WebCore::RenderObject::setHasTransform):
137         (WebCore::RenderObject::setHasReflection):
138         (WebCore::RenderObject::hasReflection):
139         (WebCore::RenderObject::setHasMarkupTruncation):
140         (WebCore::RenderObject::hasMarkupTruncation):
141         (WebCore::RenderObject::selectionState):
142         (WebCore::RenderObject::setSelectionState):
143         (WebCore::RenderObject::hasSelectedChildren):
144         (WebCore::RenderObject::isMarginBeforeQuirk):
145         (WebCore::RenderObject::isMarginAfterQuirk):
146         (WebCore::RenderObject::setMarginBeforeQuirk):
147         (WebCore::RenderObject::setMarginAfterQuirk):
148         (WebCore::RenderObject::everHadLayout):
149         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
150         (WebCore::RenderObject::RenderObjectBitfields::selectionState):
151         (WebCore::RenderObject::RenderObjectBitfields::setSelectionState):
152         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
153         (WebCore::RenderObject::setNormalChildNeedsLayout):
154         (WebCore::RenderObject::setPosChildNeedsLayout):
155         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
156         (WebCore::RenderObject::setPaintBackground):
157         (WebCore::RenderObject::setIsDragging):
158         (WebCore::RenderObject::setEverHadLayout):
159         (WebCore::RenderObject::setNeedsLayout):
160         (WebCore::RenderObject::setChildNeedsLayout):
161         * rendering/RenderObjectChildList.cpp:
162         (WebCore::RenderObjectChildList::removeChildNode):
163         * rendering/svg/RenderSVGContainer.cpp:
164         (WebCore::RenderSVGContainer::layout):
165
166 2011-12-15  Wei Charles  <charles.wei@torchmobile.com.cn>
167
168         [BlackBerry] Upstream BlackBerry porting of pluginView
169         https://bugs.webkit.org/show_bug.cgi?id=73397
170
171         Reviewed by Daniel Bates.
172
173         No new tests for now.
174
175         * plugins/blackberry/PluginViewBlackBerry.cpp: Added.
176
177 2011-12-15  Joshua Bell  <jsbell@chromium.org>
178
179         IndexedDB: Can't pass DOMStringList to IDBDatabase.transaction()
180         https://bugs.webkit.org/show_bug.cgi?id=74452
181
182         Reviewed by Adam Barth.
183
184         V8 code generator generated checks for DOMStringList arguments, then
185         deferred to a function that only handled array inputs. This previously
186         worked for IndexedDB because it would fall into a now-removed default
187         handler.
188
189         Modified storage/indexeddb/transaction-basics.html to test this.
190
191         * bindings/v8/V8Binding.cpp:
192         (WebCore::v8ValueToWebCoreDOMStringList):
193
194 2011-12-15  Adam Klein  <adamk@chromium.org>
195
196         Make Element::setAttributeInternal inline in an attempt to avoid function call overhead
197         https://bugs.webkit.org/show_bug.cgi?id=74638
198
199         Reviewed by Andreas Kling.
200
201         In r102695, I factored common code in setAttribute into
202         Element::setAttributeInternal. This may have caused a perf regression
203         due to the extra function call, which inlining should eliminate.
204
205         Running Dromaeo locally suggests that this will improve performance
206         by ~9% on the "dom-attr element.property = value" test (which assigns
207         a value to an element's id).
208
209         * dom/Element.cpp:
210         (WebCore::Element::setAttributeInternal):
211
212 2011-12-15  Mary Wu  <mary.wu@torchmobile.com.cn>
213
214         Upstream FileSystemBlackBerry.cpp into WebCore/platform/blackberry
215         https://bugs.webkit.org/show_bug.cgi?id=74491
216
217         Reviewed by Rob Buis.
218
219         We are using POSIX porting of FileSystem, so here only implement other 
220         necessary functions.
221
222         Initial upstream, no new tests.
223
224         * platform/blackberry/FileSystemBlackBerry.cpp: Added.
225         (WebCore::homeDirectoryPath):
226         (WebCore::fileSystemRepresentation):
227         (WebCore::unloadModule):
228         (WebCore::openTemporaryFile):
229
230 2011-12-15  Adrienne Walker  <enne@google.com>
231
232         [chromium] Clean up unnecessary leaf functions in GraphicsLayerChromium
233         https://bugs.webkit.org/show_bug.cgi?id=74140
234
235         Reviewed by James Robinson.
236
237         Tested by existing compositor layout tests.
238
239         This is a follow-on cleanup to r102196, which made some of these
240         functions less useful than they had been in the past.
241
242         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
243         (WebCore::GraphicsLayerChromium::setContentsOpaque):
244         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
245         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
246         * platform/graphics/chromium/GraphicsLayerChromium.h:
247
248 2011-12-15  Kenneth Russell  <kbr@google.com>
249
250         Unreviewed, rolling out r103000.
251         http://trac.webkit.org/changeset/103000
252         https://bugs.webkit.org/show_bug.cgi?id=74658
253
254         Does not handle text/plain documents correctly.
255
256         * html/parser/HTMLTokenizer.cpp:
257         * html/parser/HTMLTokenizer.h:
258         * html/parser/HTMLTreeBuilder.cpp:
259         * html/parser/HTMLTreeBuilder.h:
260         * xml/parser/MarkupTokenizerBase.h:
261
262 2011-12-15  James Robinson  <jamesr@chromium.org>
263
264         [chromium] Set the CCLayerTreeHost pointer on LayerChromium instances eagerly
265         https://bugs.webkit.org/show_bug.cgi?id=74477
266
267         Reviewed by Kenneth Russell.
268
269         This enforces that the m_layerTreeHost pointer on LayerChromium instances is always up to date, instead of
270         lazily setting it in the paintContents loop. There are two invariants:
271         1.) If a LayerChromium is the root layer of a CCLayerTreeHost, or is reachable via the children, mask, or
272         replica pointers from the root layer of a CCLayerTreeHost, then that LayerChromium's m_layerTreeHost pointer
273         refers to that CCLayerTreeHost
274         2.) If a LayerChromium is not a root layer or reachable from a root layer of any CCLayerTreeHost, its
275         CCLayerTreeHost pointer is nil.
276
277         Covered by several new layout tests in LayerChromiumTest
278
279         * platform/graphics/chromium/LayerChromium.cpp:
280         (WebCore::LayerChromium::setLayerTreeHost):
281         (WebCore::LayerChromium::setParent):
282         (WebCore::LayerChromium::setMaskLayer):
283         (WebCore::LayerChromium::setReplicaLayer):
284         * platform/graphics/chromium/LayerChromium.h:
285         * platform/graphics/chromium/TiledLayerChromium.cpp:
286         (WebCore::TiledLayerChromium::createTile):
287         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
288         (WebCore::CCLayerTreeHost::setRootLayer):
289         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
290         (WebCore::CCLayerTreeHost::paintLayerContents):
291         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
292
293 2011-12-15  Sheriff Bot  <webkit.review.bot@gmail.com>
294
295         Unreviewed, rolling out r102652 and r102717.
296         http://trac.webkit.org/changeset/102652
297         http://trac.webkit.org/changeset/102717
298         https://bugs.webkit.org/show_bug.cgi?id=74674
299
300         Broke too many webs. (Requested by kling on #webkit).
301
302         * WebCore.exp.in:
303
304 2011-12-15  Anders Carlsson  <andersca@apple.com>
305
306         Lazily create the scrolling coordinator and add a setting for enabling it
307         https://bugs.webkit.org/show_bug.cgi?id=74667
308
309         Reviewed by Darin Adler.
310
311         * WebCore.xcodeproj/project.pbxproj:
312         Make ScrollingCoordinator.h a private header so it can be used in WebKit.
313         * page/Page.cpp:
314         (WebCore::Page::Page):
315         Don't create the scrolling coordinator.
316
317         (WebCore::Page::~Page):
318         Check for a null scrolling coordinator.
319
320         (WebCore::Page::scrollingCoordinator):
321         Create the scrolling coordinator lazily.
322
323         * page/Settings.cpp:
324         (WebCore::Settings::Settings):
325         * page/Settings.h:
326         (WebCore::Settings::setScrollingCoordinatorEnabled):
327         (WebCore::Settings::scrollingCoordinatorEnabled):
328         Add a setting for enabling the scrolling coordinator.
329
330         * rendering/RenderLayerBacking.cpp:
331         (WebCore::RenderLayerBacking::RenderLayerBacking):
332         Use a tile cache layer for the main frame when the scrolling coordinator is neabled.
333
334 2011-12-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
335
336         Unreviewed. Fix build break when data-transfer-items is enabled.
337
338         * platform/efl/ClipboardEfl.cpp:
339         (WebCore::ClipboardEfl::items):
340         * platform/efl/ClipboardEfl.h:
341
342 2011-12-15  Adam Barth  <abarth@webkit.org>
343
344         <ruby><div><p><rp> parses incorrectly
345         https://bugs.webkit.org/show_bug.cgi?id=74668
346
347         Reviewed by Darin Adler.
348
349         This patch updates our implementation to match a change to the HTML5
350         specification regarding how <ruby> elements parse.  Previously, <rp>
351         and similar tags used to pop the stack up to the <ruby> element.  Now
352         the popping does not occur.
353
354         Tests: html5lib/runner.html
355
356         * html/parser/HTMLTreeBuilder.cpp:
357
358 2011-12-15  Daniel Sievers  <sievers@chromium.org>
359
360         [Chromium] Avoid strdup() for extra argument when tracing is disabled.
361         https://bugs.webkit.org/show_bug.cgi?id=74637
362
363         Reviewed by James Robinson.
364
365         * platform/chromium/TraceEvent.h:
366         (WebCore::internal::ScopeTracer::ScopeTracer):
367
368 2011-12-15  Rafael Weinstein  <rafaelw@chromium.org>
369
370         [MutationObservers] Add a document-level flag that can trivially be checked to avoid doing unnessary work if mutation observers absent
371         https://bugs.webkit.org/show_bug.cgi?id=74641
372
373         Reviewed by Ojan Vafai.
374
375         This patch adds a byte of flags to Document, of which three bits are used to signal if any
376         node owned by the document has a Mutation Observer of the given type. This is used to
377         reduce the cost of discovering there are none to a single (inlined) method call and bit-check.
378         Also, a similar byte of flags which was used to optimize a particular case when mutation observers
379         are present has been removed, with the reasoning that we should first focus on minimizing impact on
380         the null-case before optimizing particular in-use cases.
381
382         Also, MutationObserverInterestGroup is broken out into its own file (which probably should have happened
383         earlier, but now avoids a circular header dependency).
384
385         No tests needed. This patch is just a refactor.
386
387         * CMakeLists.txt:
388         * GNUmakefile.list.am:
389         * Target.pri:
390         * WebCore.gypi:
391         * WebCore.vcproj/WebCore.vcproj:
392         * WebCore.xcodeproj/project.pbxproj:
393         * css/CSSMutableStyleDeclaration.cpp:
394         * dom/CharacterData.cpp:
395         * dom/ChildListMutationScope.cpp:
396         * dom/Document.cpp:
397         (WebCore::Document::Document):
398         * dom/Document.h:
399         (WebCore::Document::hasMutationObserversOfType):
400         (WebCore::Document::hasMutationObservers):
401         (WebCore::Document::addMutationObserverTypes):
402         * dom/Element.cpp:
403         * dom/MutationObserverInterestGroup.cpp: Added.
404         (WebCore::MutationObserverInterestGroup::createIfNeeded):
405         (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
406         (WebCore::MutationObserverInterestGroup::isOldValueRequested):
407         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
408         * dom/MutationObserverInterestGroup.h: Copied from Source/WebCore/dom/WebKitMutationObserver.h.
409         (WebCore::MutationObserverInterestGroup::createForChildListMutation):
410         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
411         (WebCore::MutationObserverInterestGroup::createForAttributesMutation):
412         (WebCore::MutationObserverInterestGroup::hasOldValue):
413         * dom/Node.cpp:
414         (WebCore::Node::didMoveToNewOwnerDocument):
415         (WebCore::Node::getRegisteredMutationObserversOfType):
416         (WebCore::Node::notifyMutationObserversNodeWillDetach):
417         * dom/Node.h:
418         * dom/WebKitMutationObserver.cpp:
419         (WebCore::WebKitMutationObserver::observe):
420         * dom/WebKitMutationObserver.h:
421
422 2011-12-15  Adam Barth  <abarth@webkit.org>
423
424         <!DOCTYPE html><pre>&#x0a;&#x0a;A</pre> doesn't parse correctly
425         https://bugs.webkit.org/show_bug.cgi?id=74658
426
427         Reviewed by Darin Adler.
428
429         Previously, we handled skipping newlines after <pre> in the tokenizer,
430         which isn't how the spec handles them.  Instead, the spec skips them in
431         the tree builder.  This isn't usually observable, except in the case of
432         an HTML entity.  In that case, the tokenzier sees '&' (because the
433         entity hasn't been decoded yet), but the tree builder sees '\n' (the
434         decoded entity).  This patch fixes the bug by more closely aligning our
435         implementation with the spec.
436
437         Test: html5lib/runner.html
438
439         * html/parser/HTMLTokenizer.cpp:
440         (WebCore::HTMLTokenizer::reset):
441         (WebCore::HTMLTokenizer::nextToken):
442         * html/parser/HTMLTokenizer.h:
443         * html/parser/HTMLTreeBuilder.cpp:
444         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipAtMostOneLeadingNewline):
445         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
446         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
447         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
448         * html/parser/HTMLTreeBuilder.h:
449         * xml/parser/MarkupTokenizerBase.h:
450
451 2011-12-15  Kenneth Russell  <kbr@google.com>
452
453         Unreviewed, rolling out r102989.
454         http://trac.webkit.org/changeset/102989
455         https://bugs.webkit.org/show_bug.cgi?id=74580
456
457         Caused SHOULD NOT BE REACHED assertions in debug builds.
458
459         * css/CSSComputedStyleDeclaration.cpp:
460         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
461         * css/CSSPrimitiveValueMappings.h:
462         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
463         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
464         * css/CSSStyleSelector.cpp:
465         (WebCore::CSSStyleSelector::applyProperty):
466         * rendering/RenderDeprecatedFlexibleBox.cpp:
467         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
468         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
469         * rendering/RenderFullScreen.cpp:
470         (createFullScreenStyle):
471         * rendering/style/RenderStyle.h:
472         (WebCore::InheritedFlags::boxPack):
473         (WebCore::InheritedFlags::setBoxAlign):
474         (WebCore::InheritedFlags::setBoxPack):
475         (WebCore::InheritedFlags::initialBoxPack):
476         * rendering/style/RenderStyleConstants.h:
477         * rendering/style/StyleDeprecatedFlexibleBoxData.h:
478
479 2011-12-15  Ryosuke Niwa  <rniwa@webkit.org>
480
481         Touch make_name.pl in an attempt to make Qt bots happy.
482
483         * dom/make_names.pl:
484         (printNamesHeaderFile):
485
486 2011-12-15  Kentaro Hara  <haraken@chromium.org>
487
488         Unreviewed. Rebaselined run-bindings-tests results.
489
490         * bindings/scripts/test/JS/JSFloat64Array.cpp:
491         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
492         * bindings/scripts/test/JS/JSTestObj.cpp:
493
494 2011-12-15  Luke Macpherson   <macpherson@chromium.org>
495
496         Separate box alignment and box pack values into separate enums.
497         https://bugs.webkit.org/show_bug.cgi?id=74580
498
499         Reviewed by Darin Adler.
500
501         No new tests / refactoring only.
502
503         Separating these types cleans up the code by removing several assertions that
504         values are in the correct ranges, as this is ensured by the type system.
505
506         * css/CSSComputedStyleDeclaration.cpp:
507         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
508         * css/CSSPrimitiveValueMappings.h:
509         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
510         (WebCore::CSSPrimitiveValue::operator EBoxPack):
511         (WebCore::CSSPrimitiveValue::operator EBoxAlignment):
512         * css/CSSStyleSelector.cpp:
513         (WebCore::CSSStyleSelector::applyProperty):
514         * rendering/RenderDeprecatedFlexibleBox.cpp:
515         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
516         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
517         * rendering/RenderFullScreen.cpp:
518         (createFullScreenStyle):
519         * rendering/style/RenderStyle.h:
520         (WebCore::InheritedFlags::boxPack):
521         (WebCore::InheritedFlags::setBoxAlign):
522         (WebCore::InheritedFlags::setBoxPack):
523         (WebCore::InheritedFlags::initialBoxPack):
524         * rendering/style/RenderStyleConstants.h:
525         * rendering/style/StyleDeprecatedFlexibleBoxData.h:
526
527 2011-12-15  Kentaro Hara  <haraken@chromium.org>
528
529         REGRESSION(r102663): generate-bindings.pl runs every time
530         https://bugs.webkit.org/show_bug.cgi?id=74481
531
532         Reviewed by Adam Barth.
533
534         See the comment #1 of bug 74481 for the cause of this bug.
535
536         This patch fixes generate-bindings.pl so that it generates .h and .cpp files
537         even for IDL files that do not need .h and .cpp files. This is just to prevent
538         build scripts from trying to generate .h and .cpp files at every build.
539
540         No new tests. No change in behavior.
541
542         * bindings/scripts/generate-bindings.pl:
543         (generateEmptyHeaderAndCpp): Generates .h and .cpp files for IDL files
544         that do not need .h and .cpp files.
545         * bindings/scripts/test/CPP/CPPTestSupplemental.cpp: Added.
546         * bindings/scripts/test/CPP/CPPTestSupplemental.h: Added.
547         * bindings/scripts/test/GObject/GObjectTestSupplemental.cpp: Added.
548         * bindings/scripts/test/GObject/GObjectTestSupplemental.h: Added.
549         * bindings/scripts/test/JS/JSTestSupplemental.cpp: Added.
550         * bindings/scripts/test/JS/JSTestSupplemental.h: Added.
551         * bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp: Added.
552         * bindings/scripts/test/ObjC/ObjCTestSupplemental.h: Added.
553         * bindings/scripts/test/V8/V8TestSupplemental.cpp: Added.
554         * bindings/scripts/test/V8/V8TestSupplemental.h: Added.
555
556 2011-12-15  Jarred Nicholls  <jarred@sencha.com>
557
558         Unreviewed build fix. Mac build broken when CSS Filters enabled.
559         Needed to move Filter headers out as private headers in WebCore.framework.
560
561         * WebCore.xcodeproj/project.pbxproj:
562
563 2011-12-15  Eric Seidel  <eric@webkit.org>
564
565         WebCore has two (disconnected) ways to keep track of updated widgets, should be unified
566         https://bugs.webkit.org/show_bug.cgi?id=74367
567
568         Reviewed by Adam Barth.
569
570         It seems the FrameView updateWidgets set is needed for now,
571         so just making FrameView::addWidgetToUpdate mark the DOM node
572         as needing a widget update and later when it goes to call
573         updateWidget() checking first if it needs an update.
574
575         No new tests, just adding an assert.
576
577         * html/HTMLEmbedElement.cpp:
578         (WebCore::HTMLEmbedElement::updateWidget):
579         * html/HTMLObjectElement.cpp:
580         (WebCore::HTMLObjectElement::updateWidget):
581         * html/HTMLPlugInImageElement.h:
582         (WebCore::HTMLPlugInImageElement::needsWidgetUpdate):
583         (WebCore::HTMLPlugInImageElement::setNeedsWidgetUpdate):
584         * page/FrameView.cpp:
585         (WebCore::FrameView::addWidgetToUpdate):
586         (WebCore::FrameView::updateWidget):
587
588 2011-12-15  Alexandru Chiculita  <achicu@adobe.com>
589
590         Windows project file is broken. It has a missing </File> enclosing tag
591         https://bugs.webkit.org/show_bug.cgi?id=74632
592
593         Reviewed by Anders Carlsson.
594
595         No new tests, just fixing the project file.
596
597         * WebCore.vcproj/WebCore.vcproj:
598
599 2011-12-15  Adam Barth  <abarth@webkit.org>
600
601         <table><tr><td><svg><desc><td> parses incorrectly
602         https://bugs.webkit.org/show_bug.cgi?id=68106
603
604         Reviewed by Eric Seidel.
605
606         This patch updates our implementation of the HTML5 parser to account
607         for recent changes in the spec.  The main change in this patch is to
608         remove the "in foreign content" state from the tree builder.  Rather
609         than maintaining this as a separate state, the parser now introspects
610         on the stack of open elements to determine whether the parser is in
611         foriegn content.  In the process, I've deleted some now-unused
612         machinery in the tree builder.
613
614         Tested by the html5lib LayoutTests.  These tests show the progression
615         in our spec compliance.
616
617         * html/parser/HTMLElementStack.cpp:
618         * html/parser/HTMLElementStack.h:
619         * html/parser/HTMLTreeBuilder.cpp:
620         * html/parser/HTMLTreeBuilder.h:
621         * mathml/mathattrs.in:
622
623 2011-12-15  Ryosuke Niwa  <rniwa@webkit.org>
624
625         m_hasCounterNodeMap and m_everHadLayout should be private to RenderObject
626         https://bugs.webkit.org/show_bug.cgi?id=74645
627
628         Reviewed by Eric Seidel.
629
630         Made them private and added getters and setters as needed.
631
632         * rendering/RenderCounter.cpp:
633         (WebCore::makeCounterNode):
634         (WebCore::RenderCounter::destroyCounterNodes):
635         (WebCore::updateCounters):
636         (WebCore::RenderCounter::rendererStyleChanged):
637         (showCounterRendererTree):
638         * rendering/RenderFlowThread.cpp:
639         (WebCore::RenderFlowThread::layout):
640         * rendering/RenderObject.h:
641         (WebCore::RenderObject::hasCounterNodeMap):
642         (WebCore::RenderObject::setHasCounterNodeMap):
643         (WebCore::RenderObject::everHadLayout):
644         * rendering/svg/RenderSVGForeignObject.cpp:
645         (WebCore::RenderSVGForeignObject::layout):
646         * rendering/svg/RenderSVGImage.cpp:
647         (WebCore::RenderSVGImage::layout):
648         * rendering/svg/RenderSVGResourceContainer.cpp:
649         (WebCore::RenderSVGResourceContainer::layout):
650         * rendering/svg/RenderSVGResourceMarker.cpp:
651         (WebCore::RenderSVGResourceMarker::layout):
652         * rendering/svg/RenderSVGRoot.cpp:
653         (WebCore::RenderSVGRoot::layout):
654         * rendering/svg/RenderSVGShape.cpp:
655         (WebCore::RenderSVGShape::layout):
656         * rendering/svg/RenderSVGText.cpp:
657         (WebCore::RenderSVGText::layout):
658
659 2011-12-15  Vsevolod Vlasov  <vsevik@chromium.org>
660
661         Not able to navigate the Resource tab options properly with arrow keys after adding the sticky-notes.
662         https://bugs.webkit.org/show_bug.cgi?id=72013
663
664         Reviewed by Pavel Feldman.
665
666         * inspector/front-end/DatabaseQueryView.js:
667         (WebInspector.DatabaseQueryView):
668         (WebInspector.DatabaseQueryView.prototype._messagesClicked):
669         * inspector/front-end/ResourcesPanel.js:
670         (WebInspector.DatabaseTreeElement.prototype.onexpand):
671
672 2011-12-15  Anders Carlsson  <andersca@apple.com>
673
674         Add ScrollingCoordinator class and ENABLE_THREADED_SCROLLING define
675         https://bugs.webkit.org/show_bug.cgi?id=74639
676
677         Reviewed by Andreas Kling.
678
679         Add a ScrollingCoordinator class and make it a member of Page. Tear it down
680         when the page goes away.
681
682         * WebCore.xcodeproj/project.pbxproj:
683         * page/Page.cpp:
684         (WebCore::Page::Page):
685         (WebCore::Page::~Page):
686         * page/Page.h:
687         (WebCore::Page::scrollingCoordinator):
688         * page/ScrollingCoordinator.cpp: Added.
689         (WebCore::ScrollingCoordinator::create):
690         (WebCore::ScrollingCoordinator::ScrollingCoordinator):
691         (WebCore::ScrollingCoordinator::~ScrollingCoordinator):
692         (WebCore::ScrollingCoordinator::pageDestroyed):
693         * page/ScrollingCoordinator.h: Added.
694
695 2011-12-15  Kenneth Russell  <kbr@google.com>
696
697         Rename WEBKIT_lose_context to WEBKIT_WEBGL_lose_context
698         https://bugs.webkit.org/show_bug.cgi?id=71870
699
700         Reviewed by James Robinson.
701
702         Re-landing after original commit was rolled out.
703
704         Rename largely done with do-webcore-rename with a couple of
705         necessary manual fixups. Ran WebGL layout tests.
706
707         * CMakeLists.txt:
708         * DerivedSources.make:
709         * DerivedSources.pri:
710         * GNUmakefile.list.am:
711         * Target.pri:
712         * WebCore.gypi:
713         * WebCore.xcodeproj/project.pbxproj:
714         * bindings/js/JSWebGLRenderingContextCustom.cpp:
715         (WebCore::toJS):
716         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
717         (WebCore::toV8Object):
718         * html/canvas/WebGLExtension.h:
719         * html/canvas/WebGLLoseContext.cpp: Copied from Source/WebCore/html/canvas/WebKitLoseContext.cpp.
720         (WebCore::WebGLLoseContext::WebGLLoseContext):
721         (WebCore::WebGLLoseContext::~WebGLLoseContext):
722         (WebCore::WebGLLoseContext::getName):
723         (WebCore::WebGLLoseContext::create):
724         (WebCore::WebGLLoseContext::loseContext):
725         (WebCore::WebGLLoseContext::restoreContext):
726         * html/canvas/WebGLLoseContext.h: Copied from Source/WebCore/html/canvas/WebKitLoseContext.h.
727         * html/canvas/WebGLLoseContext.idl: Copied from Source/WebCore/html/canvas/WebKitLoseContext.idl.
728         * html/canvas/WebGLRenderingContext.cpp:
729         (WebCore::WebGLRenderingContext::getExtension):
730         (WebCore::WebGLRenderingContext::getSupportedExtensions):
731         (WebCore::WebGLRenderingContext::maybeRestoreContext):
732         * html/canvas/WebGLRenderingContext.h:
733         * html/canvas/WebKitLoseContext.cpp: Removed.
734         * html/canvas/WebKitLoseContext.h: Removed.
735         * html/canvas/WebKitLoseContext.idl: Removed.
736
737 2011-12-15  Brady Eidson  <beidson@apple.com>
738
739         https://bugs.webkit.org/show_bug.cgi?id=74631
740         HTMLMediaElement should not register for document activation callbacks as it doesn't use them
741
742         Reviewed by Eric Carlson.
743
744         No new tests. (No behavior change, pruning useless code)
745
746         * html/HTMLMediaElement.cpp:
747         (WebCore::HTMLMediaElement::HTMLMediaElement):
748         (WebCore::HTMLMediaElement::~HTMLMediaElement):
749         (WebCore::HTMLMediaElement::willMoveToNewOwnerDocument):
750         (WebCore::HTMLMediaElement::didMoveToNewOwnerDocument):
751
752 2011-12-15  Eric Carlson  <eric.carlson@apple.com>
753
754         Text tracks should be treated differently according to their kind
755         https://bugs.webkit.org/show_bug.cgi?id=72547
756
757         Reviewed by Sam Weinig.
758
759         Tests: media/track/track-default-attribute.html
760                media/track/track-mode-not-changed-by-new-track.html
761                media/track/track-mode-triggers-loading.html
762
763         * html/HTMLAudioElement.cpp:
764         (WebCore::HTMLAudioElement::HTMLAudioElement): Add "createdByParser" parameter.
765         (WebCore::HTMLAudioElement::create): Ditto.
766         (WebCore::HTMLAudioElement::createForJSConstructor): Deal with constructor change.
767         * html/HTMLAudioElement.h:
768
769         * html/HTMLMediaElement.cpp:
770         (WebCore::HTMLMediaElement::HTMLMediaElement): Add "createdByParser" parameter. Initialize m_parsingInProgress.
771         (WebCore::HTMLMediaElement::finishParsingChildren): Clear m_parsingInProgress. Schedule track
772             loading if necessary.
773         (WebCore::HTMLMediaElement::loadTimerFired): Call configureTextTracks not call scheduleLoad, 
774             it just schedules the load timer again.
775         (WebCore::HTMLMediaElement::prepareForLoad): Add all non-disabled track elements to a vector
776             so we can prevent the media element's readyState from reaching HAVE_METADATA until the
777             tracks are ready.
778         (WebCore::HTMLMediaElement::textTracksAreReady): New. Return false unless all tracks that were
779             not disabled when loading started have loaded or failed.
780         (WebCore::HTMLMediaElement::textTrackReadyStateChanged): Call setReadyState when a track is
781             stops loading.
782         (WebCore::HTMLMediaElement::textTrackModeChanged): Trigger <track> loading when the mode
783             changes to hidden or showing for the first time.
784         (WebCore::HTMLMediaElement::setReadyState): Do not advance to HAVE_METADATA or higher while
785             track elements are loading.
786         (WebCore::HTMLMediaElement::addTrack): Removed.
787         (WebCore::HTMLMediaElement::showingTrackWithSameKind): New.
788         (WebCore::HTMLMediaElement::trackWasAdded):
789         (WebCore::HTMLMediaElement::trackWillBeRemoved): Flag a track as unconfigured so it will be
790             reconfigured if it is added to another element.
791         (WebCore::HTMLMediaElement::userIsInterestedInThisLanguage): New.
792         (WebCore::HTMLMediaElement::userIsInterestedInThisTrack): New. Consider user preferences.
793         (WebCore::HTMLMediaElement::configureTextTrack): New. Configure a track as per the user's preferences.
794         (WebCore::HTMLMediaElement::configureTextTracks): New. Configure all track elements.
795         * html/HTMLMediaElement.h:
796         * html/HTMLMediaElement.h:
797
798         * html/HTMLTagNames.in: Add constructorNeedsCreatedByParser to audio and video.
799
800         * html/HTMLTrackElement.cpp:
801         (WebCore::HTMLTrackElement::HTMLTrackElement): Initialize m_hasBeenConfigured.
802         * html/HTMLTrackElement.h:
803         (WebCore::HTMLTrackElement::hasBeenConfigured):
804         (WebCore::HTMLTrackElement::setHasBeenConfigured):
805
806         * html/HTMLVideoElement.cpp:
807         (WebCore::HTMLVideoElement::HTMLVideoElement): Add "createdByParser" parameter.
808         (WebCore::HTMLVideoElement::create): Ditto.
809         * html/HTMLVideoElement.h:
810
811         * html/TextTrack.cpp:
812         (WebCore::TextTrack::TextTrack): Initialize m_mode to DISABLED, not HIDDEN. Initialize m_showingByDefault.
813         (WebCore::TextTrack::setMode): Clear the "showing by default" flag when a track's mode is
814             explicitly set to SHOWING.
815         (WebCore::TextTrack::mode): Return SHOWING whenever the "showing by default" flag is set.
816         * html/TextTrack.h:
817         (WebCore::TextTrack::showingByDefault):
818         (WebCore::TextTrack::setShowingByDefault):
819
820         * html/TextTrackCue.cpp:
821         (WebCore::TextTrackCue::isActive): Return false if a cue has no track, or if its track is disabled.
822         (WebCore::TextTrackCue::setIsActive): Don't enable a cue if it has no track, or if its track
823             is disabled.
824
825 2011-12-15  Brady Eidson  <beidson@apple.com>
826
827         Unreviewed, rolling out r102829.
828         http://trac.webkit.org/changeset/102829
829         https://bugs.webkit.org/show_bug.cgi?id=74533
830
831         Caused https://bugs.webkit.org/show_bug.cgi?id=74555
832
833         * html/HTMLPlugInImageElement.cpp:
834         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
835         (WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument):
836         (WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument):
837         (WebCore::HTMLPlugInImageElement::documentWillBecomeInactive):
838         (WebCore::HTMLPlugInImageElement::documentDidBecomeActive):
839         * html/HTMLPlugInImageElement.h:
840
841 2011-12-15  James Simonsen  <simonjam@chromium.org>
842
843         [Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()
844         https://bugs.webkit.org/show_bug.cgi?id=58354
845
846         Reviewed by Pavel Feldman.
847
848         No new tests. Relies on existing webtiming-* tests.
849
850         * CMakeLists.txt:
851         * GNUmakefile.list.am:
852         * WebCore.gypi:
853         * WebCore.pro:
854         * WebCore.vcproj/WebCore.vcproj:
855         * WebCore.xcodeproj/project.pbxproj:
856         * dom/Document.cpp: Use monotonic times.
857         (WebCore::Document::setReadyState):
858         (WebCore::Document::finishedParsing):
859         * inspector/InspectorInstrumentation.cpp:
860         (WebCore::InspectorInstrumentation::didFinishLoadingImpl): Convert monotonicFinishTime to wall time if needed.
861         * inspector/InspectorResourceAgent.cpp:
862         (WebCore::buildObjectForTiming): Convert monotonic requestTime to wall time.
863         (WebCore::buildObjectForResourceResponse): Plumbing for above.
864         (WebCore::buildObjectForCachedResource): Ditto.
865         (WebCore::InspectorResourceAgent::willSendRequest): Ditto.
866         (WebCore::InspectorResourceAgent::didReceiveResponse): Ditto.
867         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): Ditto.
868         * loader/DocumentLoadTiming.cpp: Added.
869         (WebCore::DocumentLoadTiming::DocumentLoadTiming):
870         (WebCore::DocumentLoadTiming::setNavigationStart): Determine reference time and root reference time.
871         (WebCore::DocumentLoadTiming::addRedirect): Moved logic from MainResourceLoader.
872         (WebCore::DocumentLoadTiming::convertMonotonicTimeToDocumentTime): Helper to compute wall time from monotonic time.
873         * loader/DocumentLoadTiming.h: Turned into class. Made times monotonic.
874         (WebCore::DocumentLoadTiming::setUnloadEventStart):
875         (WebCore::DocumentLoadTiming::setUnloadEventEnd):
876         (WebCore::DocumentLoadTiming::setRedirectStart):
877         (WebCore::DocumentLoadTiming::setRedirectEnd):
878         (WebCore::DocumentLoadTiming::setFetchStart):
879         (WebCore::DocumentLoadTiming::setResponseEnd):
880         (WebCore::DocumentLoadTiming::setLoadEventStart):
881         (WebCore::DocumentLoadTiming::setLoadEventEnd):
882         (WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument):
883         (WebCore::DocumentLoadTiming::navigationStart):
884         (WebCore::DocumentLoadTiming::unloadEventStart):
885         (WebCore::DocumentLoadTiming::unloadEventEnd):
886         (WebCore::DocumentLoadTiming::redirectStart):
887         (WebCore::DocumentLoadTiming::redirectEnd):
888         (WebCore::DocumentLoadTiming::redirectCount):
889         (WebCore::DocumentLoadTiming::fetchStart):
890         (WebCore::DocumentLoadTiming::responseEnd):
891         (WebCore::DocumentLoadTiming::loadEventStart):
892         (WebCore::DocumentLoadTiming::loadEventEnd):
893         (WebCore::DocumentLoadTiming::hasCrossOriginRedirect):
894         (WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument):
895         * loader/FrameLoader.cpp:
896         (WebCore::FrameLoader::stopLoading):
897         (WebCore::FrameLoader::commitProvisionalLoad):
898         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
899         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
900         * loader/MainResourceLoader.cpp:
901         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
902         (WebCore::MainResourceLoader::willSendRequest): Moved logic to DocumentLoadTiming.
903         (WebCore::MainResourceLoader::didReceiveData): Use monotonic time.
904         (WebCore::MainResourceLoader::didFinishLoading): Ditto.
905         (WebCore::MainResourceLoader::load):
906         * page/DOMWindow.cpp:
907         (WebCore::DOMWindow::dispatchLoadEvent):
908         * page/DOMWindow.h: Removed dispatchTimedEvent. It doesn't really help in the new model.
909         * page/PerformanceNavigation.cpp:
910         (WebCore::PerformanceNavigation::redirectCount):
911         * page/PerformanceTiming.cpp: Removed skew correction code. This should never happen now.
912         (WebCore::PerformanceTiming::navigationStart):
913         (WebCore::PerformanceTiming::unloadEventStart):
914         (WebCore::PerformanceTiming::unloadEventEnd):
915         (WebCore::PerformanceTiming::redirectStart):
916         (WebCore::PerformanceTiming::redirectEnd):
917         (WebCore::PerformanceTiming::fetchStart):
918         (WebCore::PerformanceTiming::responseEnd):
919         (WebCore::PerformanceTiming::domLoading):
920         (WebCore::PerformanceTiming::domInteractive):
921         (WebCore::PerformanceTiming::domContentLoadedEventStart):
922         (WebCore::PerformanceTiming::domContentLoadedEventEnd):
923         (WebCore::PerformanceTiming::domComplete):
924         (WebCore::PerformanceTiming::loadEventStart):
925         (WebCore::PerformanceTiming::loadEventEnd):
926         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Used for ResourceLoadTiming.
927         (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds): Used for DocumentTiming and DocumentLoadTiming.
928         * page/PerformanceTiming.h:
929         * platform/network/ResourceLoadTiming.cpp:
930         (WebCore::ResourceLoadTiming::convertResourceLoadTimeToDocumentTime):
931         * platform/network/ResourceLoadTiming.h: Added helper function to convert to wall times. Added instructions for use.
932
933 2011-12-15  Martin Robinson  <mrobinson@igalia.com>
934
935         plugin crash
936
937         [GTK] Plugins sometimes crash WebKitGTK+ with Gdk-CRITICAL **: gdk_window_get_toplevel: assertion `GDK_IS_WINDOW (window)' failed
938         https://bugs.webkit.org/show_bug.cgi?id=73719
939
940         Reviewed by Philippe Normand.
941
942         No new tests. It's difficult to test or reproduce this exact situation
943         as it only occurs when running plugins under nspluginwrapper.
944
945         * plugins/gtk/PluginViewGtk.cpp:
946         (WebCore::PluginView::platformGetValue): Properly handle when the plugin tries to
947         get the window value when the GtkSocket is no longer realized.
948
949 2011-12-15  Martin Kosiba  <mkosiba@google.com>
950
951         Fix find on web pages with -webkit-user-select: none for Chromium
952         https://bugs.webkit.org/show_bug.cgi?id=72281
953
954         Reviewed by Ryosuke Niwa.
955
956         Adding findStringAndScrollToVisible to Editor. This new method returns
957         the new match as a range rather than modify the active selection.
958
959         Test: editing/text-iterator/findString-selection-disabled.html
960
961         * editing/Editor.cpp:
962         (WebCore::Editor::findStringAndScrollToVisible):
963         * editing/Editor.h:
964
965 2011-12-14  Anders Carlsson  <andersca@apple.com>
966
967         Add WTF::Function to wtf/Forward.h
968         https://bugs.webkit.org/show_bug.cgi?id=74576
969
970         Reviewed by Adam Roben.
971
972         * bindings/scripts/CodeGeneratorJS.pm:
973         (GenerateImplementation):
974         Add a JSC:: qualifier to the Function flags to avoid ambiguities.
975
976 2011-12-15  Julien Chaffraix  <jchaffraix@webkit.org>
977
978         Hardware-backed renderLayer could avoid repainting during a positioned movement layout
979         https://bugs.webkit.org/show_bug.cgi?id=74370
980
981         Reviewed by Simon Fraser.
982
983         Tests: compositing/absolute-position-changed-in-composited-layer.html
984                compositing/absolute-position-changed-with-composited-parent-layer.html
985                compositing/fixed-position-changed-in-composited-layer.html
986                compositing/fixed-position-changed-within-composited-parent-layer.html
987
988         To be able to properly skip repainting after a positioned movement layout only, we
989         needed to add more state to the current |setNeedsFullRepaint| method. As part of that
990         we refactored the callers and internal fields to better match the new meaning.
991
992         * rendering/RenderBoxModelObject.cpp:
993         (WebCore::RenderBoxModelObject::styleDidChange):
994         Explicitely gave the RepaintStatus to setRepaintStatus.
995
996         * rendering/RenderLayer.cpp:
997         (WebCore::RenderLayer::RenderLayer):
998         (WebCore::RenderLayer::removeOnlyThisLayer):
999         Updated those function after the renamings.
1000
1001         (WebCore::RenderLayer::updateLayerPositions):
1002         Ditto. Also added a sholdRepaintAfterLayout check.
1003
1004         (WebCore::RenderLayer::shouldRepaintAfterLayout):
1005         Heart of the optimization, if we just did a positioned movement layout of composited RenderLayer,
1006         then don't repaint. All the other cases should still trigger a repaint.
1007
1008         * rendering/RenderLayer.h:
1009         (WebCore::RenderLayer::setRepaintStatus):
1010         Renamed setNeedsFullRepaint to setRepaintStatus. Also added a new enum RepaintStatus.
1011
1012         * rendering/RenderObject.cpp:
1013         (WebCore::RenderObject::setLayerNeedsFullRepaint):
1014         Updated after the renamings.
1015
1016         (WebCore::RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout):
1017         New method that pass a new value to the RenderLayer.
1018
1019         * rendering/RenderObject.h:
1020         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
1021         Switched the call to the dedicated method.
1022
1023 2011-12-15  Antti Koivisto  <antti@apple.com>
1024
1025         Don't invoke CSSStyleSelector::pushParent before Text::recalcTextStyle
1026         https://bugs.webkit.org/show_bug.cgi?id=74575
1027
1028         Reviewed by Darin Adler.
1029         
1030         Text::recalcTextStyle never enters the style selector so pushing the state is not necessary
1031
1032         * dom/Element.cpp:
1033         (WebCore::Element::recalcStyle):
1034
1035 2011-12-15  Chris Marrin  <cmarrin@apple.com>
1036
1037         Fixed error in Target.pri.
1038
1039         Unreviewed.
1040
1041         * Target.pri:
1042
1043 2011-12-15  Alexander Pavlov  <apavlov@chromium.org>
1044
1045         Web Inspector: #hex colors are not highlighted in CSS files
1046         https://bugs.webkit.org/show_bug.cgi?id=74570
1047
1048         Reviewed by Pavel Feldman.
1049
1050         Drive by: highlight color keywords as colors, not as keywords.
1051
1052         * inspector/front-end/CSSKeywordCompletions.js:
1053         (WebInspector.CSSKeywordCompletions.colors):
1054         * inspector/front-end/SourceCSSTokenizer.js:
1055         (WebInspector.SourceCSSTokenizer):
1056         (WebInspector.SourceCSSTokenizer.prototype.nextToken):
1057         * inspector/front-end/SourceCSSTokenizer.re2js:
1058
1059 2011-12-14  Chris Marrin  <cmarrin@apple.com>
1060
1061         Hardware acceleration of W3C Filter Effects
1062         https://bugs.webkit.org/show_bug.cgi?id=68479
1063
1064         Reviewed by Simon Fraser.
1065
1066         Move FilterOperation(s) to platform/graphics/filters so it can be used to pass filter information 
1067         down to GraphicsLayer for hardware acceleration. This leaves the CustomFilterOperation subclass in
1068         rendering/style since it has dependencies outside platform. Some part of that class will
1069         eventually need to be down in platform.
1070
1071         * CMakeLists.txt:
1072         * GNUmakefile.list.am:
1073         * Target.pri:
1074         * WebCore.gypi:
1075         * WebCore.vcproj/WebCore.vcproj:
1076         * WebCore.xcodeproj/project.pbxproj:
1077         * platform/graphics/filters/FilterOperation.cpp: Renamed from Source/WebCore/rendering/style/FilterOperation.cpp.
1078         (WebCore::BasicColorMatrixFilterOperation::blend):
1079         (WebCore::BasicColorMatrixFilterOperation::passthroughAmount):
1080         (WebCore::BasicComponentTransferFilterOperation::blend):
1081         (WebCore::BasicComponentTransferFilterOperation::passthroughAmount):
1082         (WebCore::GammaFilterOperation::blend):
1083         (WebCore::BlurFilterOperation::blend):
1084         (WebCore::DropShadowFilterOperation::blend):
1085         * platform/graphics/filters/FilterOperation.h: Renamed from Source/WebCore/rendering/style/FilterOperation.h.
1086         (WebCore::FilterOperation::~FilterOperation):
1087         (WebCore::FilterOperation::operator!=):
1088         (WebCore::FilterOperation::blend):
1089         (WebCore::FilterOperation::getOperationType):
1090         (WebCore::FilterOperation::isSameType):
1091         (WebCore::FilterOperation::FilterOperation):
1092         (WebCore::PassthroughFilterOperation::create):
1093         (WebCore::PassthroughFilterOperation::operator==):
1094         (WebCore::PassthroughFilterOperation::PassthroughFilterOperation):
1095         (WebCore::ReferenceFilterOperation::create):
1096         (WebCore::ReferenceFilterOperation::reference):
1097         (WebCore::ReferenceFilterOperation::operator==):
1098         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
1099         (WebCore::BasicColorMatrixFilterOperation::create):
1100         (WebCore::BasicColorMatrixFilterOperation::amount):
1101         (WebCore::BasicColorMatrixFilterOperation::operator==):
1102         (WebCore::BasicColorMatrixFilterOperation::BasicColorMatrixFilterOperation):
1103         (WebCore::BasicComponentTransferFilterOperation::create):
1104         (WebCore::BasicComponentTransferFilterOperation::amount):
1105         (WebCore::BasicComponentTransferFilterOperation::operator==):
1106         (WebCore::BasicComponentTransferFilterOperation::BasicComponentTransferFilterOperation):
1107         (WebCore::GammaFilterOperation::create):
1108         (WebCore::GammaFilterOperation::amplitude):
1109         (WebCore::GammaFilterOperation::exponent):
1110         (WebCore::GammaFilterOperation::offset):
1111         (WebCore::GammaFilterOperation::operator==):
1112         (WebCore::GammaFilterOperation::GammaFilterOperation):
1113         (WebCore::BlurFilterOperation::create):
1114         (WebCore::BlurFilterOperation::stdDeviationX):
1115         (WebCore::BlurFilterOperation::stdDeviationY):
1116         (WebCore::BlurFilterOperation::operator==):
1117         (WebCore::BlurFilterOperation::BlurFilterOperation):
1118         (WebCore::SharpenFilterOperation::create):
1119         (WebCore::SharpenFilterOperation::amount):
1120         (WebCore::SharpenFilterOperation::radius):
1121         (WebCore::SharpenFilterOperation::threshold):
1122         (WebCore::SharpenFilterOperation::operator==):
1123         (WebCore::SharpenFilterOperation::SharpenFilterOperation):
1124         (WebCore::DropShadowFilterOperation::create):
1125         (WebCore::DropShadowFilterOperation::x):
1126         (WebCore::DropShadowFilterOperation::y):
1127         (WebCore::DropShadowFilterOperation::stdDeviation):
1128         (WebCore::DropShadowFilterOperation::color):
1129         (WebCore::DropShadowFilterOperation::operator==):
1130         (WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
1131         * platform/graphics/filters/FilterOperations.cpp: Renamed from Source/WebCore/rendering/style/FilterOperations.cpp.
1132         (WebCore::FilterOperations::FilterOperations):
1133         (WebCore::FilterOperations::operator==):
1134         (WebCore::FilterOperations::operationsMatch):
1135         * platform/graphics/filters/FilterOperations.h: Renamed from Source/WebCore/rendering/style/FilterOperations.h.
1136         (WebCore::FilterOperations::operator!=):
1137         (WebCore::FilterOperations::clear):
1138         (WebCore::FilterOperations::operations):
1139         (WebCore::FilterOperations::size):
1140         (WebCore::FilterOperations::at):
1141
1142 2011-12-15  Igor Oliveira  <igor.oliveira@openbossa.org>
1143
1144         [Qt] Support requestAnimationFrame API
1145         https://bugs.webkit.org/show_bug.cgi?id=74528
1146
1147         Add necessary files to Target.pri when enabling requestAnimationFrame option.
1148
1149         Reviewed by Kenneth Rohde Christiansen.
1150
1151         * Target.pri:
1152
1153 2011-12-15  Otto Cheung  <ocheung@rim.com>
1154
1155         Removing BlackBerryCookieCache from the build system
1156         https://bugs.webkit.org/show_bug.cgi?id=74318
1157
1158         Reviewed by Rob Buis.
1159
1160         Removing any references to BlackBerryCookieCache in files that are upstreamed.
1161
1162         We are removing the BlackBerryCookieCache because the CookieManager cookie structure has been
1163         refactored to have a similar structure to the cache. Since the read speeds in both structures
1164         are similar, we no longer need the cache to speed up read performance.
1165
1166         No new tests, this patch by itself will not work. This patch is only removing
1167         the references to BlackBerryCookieCache in files that are upstreamed.
1168
1169         * PlatformBlackBerry.cmake:
1170         * platform/network/blackberry/NetworkJob.cpp:
1171         (WebCore::NetworkJob::handleNotifyHeaderReceived):
1172
1173 2011-12-15  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1174
1175         [Qt] Mobile theme improvements
1176
1177         Rubberstamped by Simon Hausmann.
1178
1179         - Invert the gradient on the checkboxes
1180         - Make the buttons on the multi select combobox work on floats
1181         - Mini cleanups
1182
1183         * platform/qt/RenderThemeQtMobile.cpp:
1184         (WebCore::StylePainterMobile::drawCheckableBackground):
1185         (WebCore::StylePainterMobile::drawMultipleComboButton):
1186         (WebCore::StylePainterMobile::getButtonImageSize):
1187         (WebCore::StylePainterMobile::drawComboBox):
1188
1189 2011-12-15  Peter Rybin  <peter.rybin@gmail.com>
1190
1191         Web Inspector: CodeGeneratorInspector.py convert script conditions to precompiler #ifs
1192         https://bugs.webkit.org/show_bug.cgi?id=74534
1193
1194         Reviewed by Pavel Feldman.
1195
1196         Generator is rewritten to add #if's to output.
1197
1198         * inspector/CodeGeneratorInspector.py:
1199         (DomainNameFixes.get_fixed_data.Res.get_guard.Guard.generate_open):
1200         (DomainNameFixes.get_fixed_data.Res.get_guard.Guard):
1201         (DomainNameFixes.get_fixed_data.Res.get_guard.Guard.generate_close):
1202         (DomainNameFixes.get_fixed_data.Res):
1203         (DomainNameFixes.get_fixed_data.Res.get_guard):
1204         (Generator.go):
1205         (Generator.process_event):
1206         (Generator.process_command):
1207         (Generator.process_types):
1208
1209 2011-12-15  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1210
1211         [Qt][WK2] Setting Download as action for navigation request crashes WebProcess
1212         https://bugs.webkit.org/show_bug.cgi?id=74526
1213
1214         Reviewed by Simon Hausmann.
1215
1216         Adding checks for networkcontext and networkAccessManager
1217         and return true in case they don't exist, following the same
1218         logic as if the CookieJar doesn't exist.
1219
1220         * platform/qt/ThirdPartyCookiesQt.cpp:
1221         (WebCore::thirdPartyCookiePolicyPermits):
1222
1223 2011-12-14  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1224
1225         [Qt] Get rid of layering violation in PluginViewQt
1226
1227         PluginViewQt has a layering violation in relying on QWebPagePrivate for
1228         the check if running under DRT. We remove this and add a specific flag
1229         in the PluginView for this check, enabled from DRTSupport. This isn't
1230         pretty, but an improvement over what's currently there.
1231
1232         Reviewed by Simon Hausmann.
1233
1234         * plugins/PluginView.h:
1235         * plugins/qt/PluginViewQt.cpp:
1236         (WebCore::PluginView::updatePluginWidget):
1237         (WebCore::setXKeyEventSpecificFields):
1238
1239 2011-12-14  Vsevolod Vlasov  <vsevik@chromium.org>
1240
1241         Web Inspector: Console should show network messages origins.
1242         https://bugs.webkit.org/show_bug.cgi?id=74521
1243
1244         Reviewed by Pavel Feldman.
1245
1246         * inspector/front-end/ConsoleMessage.js:
1247         (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
1248
1249 2011-12-15  Rakesh KN  <rakesh.kn@motorola.com>
1250
1251         "user-select none" causes selection to incorrectly escape from clicked container
1252         https://bugs.webkit.org/show_bug.cgi?id=57289
1253
1254         Reviewed by Ryosuke Niwa.
1255
1256         Not selecting the nearest word from the target node if target node has -webkit-user-select:none
1257
1258         Test: fast/events/mouse-double-triple-click-should-not-select-next-node-for-user-select-none.html
1259
1260         * page/EventHandler.cpp:
1261         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
1262         If target node has webkit-user-select:none style then do not update the selection.
1263
1264 2011-12-13  Andrey Kosyakov  <caseq@chromium.org>
1265
1266         Web Inspector: Generated HAR is missing pages.startedDateTime
1267         https://bugs.webkit.org/show_bug.cgi?id=74188
1268
1269         Reviewed by Pavel Feldman.
1270
1271         * inspector/front-end/HAREntry.js:
1272         (WebInspector.HARLog.prototype._buildPages):
1273         * inspector/front-end/NetworkLog.js:
1274         (WebInspector.NetworkLog):
1275         (WebInspector.NetworkLog.prototype.get mainResourceStartTime):
1276         (WebInspector.NetworkLog.prototype._mainFrameNavigated):
1277         * inspector/front-end/NetworkPanel.js:
1278         (WebInspector.NetworkLogView.prototype._updateSummaryBar):
1279
1280 2011-12-15  Kenichi Ishibashi  <bashi@chromium.org>
1281
1282         Supports Unicode variation selector
1283         https://bugs.webkit.org/show_bug.cgi?id=50999
1284
1285         Reviewed by Nikolas Zimmermann.
1286
1287         Adds SimpleFontData::updateGlyphWithVariationSelector() which substitutes the
1288         glyph in question based on the selector. WidthIterator::advance() calls it
1289         when an unicode variation selector follows the character.
1290
1291         Test: fast/text/unicode-variation-selector.html
1292
1293         * platform/graphics/SimpleFontData.h: Added updateGlyphWithVariationSelector().
1294         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
1295         (WebCore::isUnicodeBMPVariationSelector): Added.
1296         (WebCore::isUnicodeSupplementaryVariationSelector): Added.
1297         (WebCore::SurrogatePairAwareTextIterator::hasTrailingVariationSelector): Added.
1298         * platform/graphics/SurrogatePairAwareTextIterator.h:
1299         * platform/graphics/WidthIterator.cpp:
1300         (WebCore::WidthIterator::advance): Changed to detect variation selectors.
1301         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
1302         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Added.
1303         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
1304         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
1305         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1306         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
1307         * platform/graphics/mac/SimpleFontDataMac.mm:
1308         (WebCore::decomposeToUTF16): Ditto.
1309         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
1310         * platform/graphics/pango/SimpleFontDataPango.cpp:
1311         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
1312         * platform/graphics/qt/SimpleFontDataQt.cpp:
1313         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
1314         * platform/graphics/win/SimpleFontDataWin.cpp:
1315         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
1316         * platform/graphics/wince/SimpleFontDataWinCE.cpp:
1317         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
1318         * platform/graphics/wx/SimpleFontDataWx.cpp:
1319         (WebCore::SimpleFontData::updateGlyphWithVariationSelector): Ditto.
1320
1321 2011-12-15  Alexander Pavlov  <apavlov@chromium.org>
1322
1323         [v8] Expose the "filter" property in V8CSSStyleDeclaration
1324         https://bugs.webkit.org/show_bug.cgi?id=73426
1325
1326         Reviewed by Adam Barth.
1327
1328         Test: fast/css/style-enumerate-properties.html
1329
1330         The "filter" CSS property used to be masked to be compliant with JSC, but JSC has supported
1331         this property for quite a while.
1332
1333         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
1334         (WebCore::hasCSSPropertyNamePrefix): clean up WTF prefixes
1335         (WebCore::cssPropertyInfo): remove the "wasFilter" flag
1336         (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): remove the "filter" check
1337         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter): return the "filter" value as v8String
1338
1339 2011-12-15  Hajime Morrita  <morrita@chromium.org>
1340
1341         Unreviewed build fix attempt for Chromium Mac.
1342
1343         * page/PerformanceTiming.h:
1344
1345 2011-12-15  Alexander Pavlov  <apavlov@chromium.org>
1346
1347         Unreviewed, build fix after r102906 (poor merge).
1348
1349         * inspector/front-end/ProfileView.js:
1350         (WebInspector.CPUProfileType.prototype.buttonClicked):
1351
1352 2011-12-15  Vsevolod Vlasov  <vsevik@chromium.org>
1353
1354         Unreviewed revert of r102696 ([Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()).
1355         Breaks inspector's network panel timeline on chromium.
1356
1357         * CMakeLists.txt:
1358         * GNUmakefile.list.am:
1359         * Target.pri:
1360         * WebCore.gypi:
1361         * WebCore.vcproj/WebCore.vcproj:
1362         * WebCore.xcodeproj/project.pbxproj:
1363         * dom/Document.cpp:
1364         (WebCore::Document::setReadyState):
1365         (WebCore::Document::finishedParsing):
1366         * inspector/InspectorInstrumentation.cpp:
1367         (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
1368         * inspector/InspectorResourceAgent.cpp:
1369         (WebCore::buildObjectForTiming):
1370         (WebCore::buildObjectForResourceResponse):
1371         (WebCore::buildObjectForCachedResource):
1372         (WebCore::InspectorResourceAgent::willSendRequest):
1373         (WebCore::InspectorResourceAgent::didReceiveResponse):
1374         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1375         * loader/DocumentLoadTiming.cpp: Removed.
1376         * loader/DocumentLoadTiming.h:
1377         (WebCore::DocumentLoadTiming::DocumentLoadTiming):
1378         * loader/FrameLoader.cpp:
1379         (WebCore::FrameLoader::stopLoading):
1380         (WebCore::FrameLoader::commitProvisionalLoad):
1381         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
1382         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
1383         * loader/MainResourceLoader.cpp:
1384         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
1385         (WebCore::MainResourceLoader::willSendRequest):
1386         (WebCore::MainResourceLoader::didReceiveData):
1387         (WebCore::MainResourceLoader::didFinishLoading):
1388         (WebCore::MainResourceLoader::load):
1389         * page/DOMWindow.cpp:
1390         (WebCore::DOMWindow::dispatchLoadEvent):
1391         (WebCore::DOMWindow::dispatchTimedEvent):
1392         * page/DOMWindow.h:
1393         * page/PerformanceNavigation.cpp:
1394         (WebCore::PerformanceNavigation::redirectCount):
1395         * page/PerformanceTiming.cpp:
1396         (WebCore::getPossiblySkewedTimeInKnownRange):
1397         (WebCore::PerformanceTiming::navigationStart):
1398         (WebCore::PerformanceTiming::unloadEventStart):
1399         (WebCore::PerformanceTiming::unloadEventEnd):
1400         (WebCore::PerformanceTiming::redirectStart):
1401         (WebCore::PerformanceTiming::redirectEnd):
1402         (WebCore::PerformanceTiming::fetchStart):
1403         (WebCore::PerformanceTiming::responseEnd):
1404         (WebCore::PerformanceTiming::domLoading):
1405         (WebCore::PerformanceTiming::domInteractive):
1406         (WebCore::PerformanceTiming::domContentLoadedEventStart):
1407         (WebCore::PerformanceTiming::domContentLoadedEventEnd):
1408         (WebCore::PerformanceTiming::domComplete):
1409         (WebCore::PerformanceTiming::loadEventStart):
1410         (WebCore::PerformanceTiming::loadEventEnd):
1411         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
1412         * page/PerformanceTiming.h:
1413         * platform/network/ResourceLoadTiming.cpp: Removed.
1414         * platform/network/ResourceLoadTiming.h:
1415
1416 2011-12-15  Alexander Pavlov  <apavlov@chromium.org>
1417
1418         Unreviewed, fix Closure compiler warnings after r102905.
1419
1420         * inspector/front-end/CSSStyleModel.js: Add JSDoc annotations
1421
1422 2011-12-14  Alexander Pavlov  <apavlov@chromium.org>
1423
1424         Web Inspector: make ProfilesPanel scale as the number of ProfileTypes grows
1425         https://bugs.webkit.org/show_bug.cgi?id=74391
1426
1427         Reviewed by Pavel Feldman.
1428
1429         Whenever a profile is started, this change disables all profile recording buttons, except the one
1430         that correponds to the running profile. Once the profiling is finished, all buttons get enabled back again.
1431
1432         * English.lproj/localizedStrings.js:
1433         * inspector/front-end/ProfileView.js:
1434         (WebInspector.CPUProfileView.profileCallback):
1435         (WebInspector.CPUProfileType.prototype.get buttonTooltip):
1436         (WebInspector.CPUProfileType.prototype.get buttonStyle):
1437         (WebInspector.CPUProfileType.prototype.buttonClicked):
1438         * inspector/front-end/ProfilesPanel.js:
1439         (WebInspector.ProfilesPanel.prototype.get statusBarItems.clickHandler):
1440         (WebInspector.ProfilesPanel.prototype.get statusBarItems):
1441         (WebInspector.ProfilesPanel.prototype._addProfileHeader):
1442         (WebInspector.ProfilesPanel.prototype.updateProfileTypeButtons):
1443         (WebInspector.ProfilesPanel.prototype._updateInterface):
1444         (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
1445         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
1446         (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
1447         (WebInspector.ProfilerDispatcher.prototype.setRecordingProfile):
1448         * inspector/front-end/inspector.css:
1449         (.record-cpu-profile-status-bar-item .glyph):
1450         (.record-cpu-profile-status-bar-item.toggled-on .glyph):
1451
1452 2011-12-15  Alexander Pavlov  <apavlov@chromium.org>
1453
1454         Web Inspector: [Styles] Update selected DOM element styles whenever applicable media queries change
1455         https://bugs.webkit.org/show_bug.cgi?id=74292
1456
1457         The change introduces and handles in the frontend a new event type for the CSS domain,
1458         "mediaQueryResultChanged", which gets fired every time a viewport-dependent media feature
1459         changes its value. This allows users to see live changes of the (media-dependent) matched
1460         rules for inspected elements.
1461
1462         Reviewed by Pavel Feldman.
1463
1464         * inspector/CodeGeneratorInspector.py:
1465         (DomainNameFixes):
1466         * inspector/Inspector.json:
1467         * inspector/InspectorCSSAgent.cpp:
1468         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
1469         (WebCore::InspectorCSSAgent::setFrontend):
1470         (WebCore::InspectorCSSAgent::clearFrontend):
1471         (WebCore::InspectorCSSAgent::restore):
1472         (WebCore::InspectorCSSAgent::enable):
1473         (WebCore::InspectorCSSAgent::disable):
1474         (WebCore::InspectorCSSAgent::mediaQueryResultChanged):
1475         * inspector/InspectorCSSAgent.h:
1476         * inspector/InspectorInstrumentation.cpp:
1477         (WebCore::InspectorInstrumentation::mediaQueryResultChangedImpl):
1478         * inspector/InspectorInstrumentation.h:
1479         (WebCore::InspectorInstrumentation::mediaQueryResultChanged):
1480         * inspector/front-end/CSSStyleModel.js:
1481         (WebInspector.CSSStyleModel):
1482         (WebInspector.CSSStyleModel.prototype.mediaQueryResultChanged):
1483         (WebInspector.CSSDispatcher):
1484         (WebInspector.CSSDispatcher.prototype.mediaQueryResultChanged):
1485         * inspector/front-end/MetricsSidebarPane.js:
1486         (WebInspector.MetricsSidebarPane):
1487         (WebInspector.MetricsSidebarPane.prototype._styleSheetOrMediaQueryResultChanged):
1488         * inspector/front-end/StylesSidebarPane.js:
1489         (WebInspector.StylesSidebarPane):
1490         (WebInspector.StylesSidebarPane.prototype._styleSheetOrMediaQueryResultChanged):
1491         * page/FrameView.cpp:
1492         (WebCore::FrameView::layout):
1493
1494 2011-12-14  Vsevolod Vlasov  <vsevik@chromium.org>
1495
1496         Web Inspector: [Regression] Network manager fails to show resource type and MIME type in incorrect MIME type console message.
1497         https://bugs.webkit.org/show_bug.cgi?id=74516
1498
1499         Reviewed by Pavel Feldman.
1500
1501         Test: http/tests/inspector/network/script-as-text-loading.html
1502
1503         * inspector/front-end/ConsoleMessage.js:
1504         (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
1505         * inspector/front-end/NetworkManager.js:
1506         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
1507
1508 2011-11-03  Kent Tamura  <tkent@chromium.org>
1509
1510         A spin button changes the value incorrectly if it is clicked after touch events.
1511         https://bugs.webkit.org/show_bug.cgi?id=71181
1512
1513         Reviewed by Ryosuke Niwa.
1514
1515         SpinButtonElement assumed setHovered(true) was always called before a
1516         mousemove event in the element. It is not true for touch events.
1517
1518         We should not reset m_upDownState to Indetermiante in setHovered(true),
1519         and should reset it when the mouse pointer moves out.
1520
1521         This change fixes the flakiness of fast/forms/input-step-as-double.html.
1522
1523         Test: fast/events/touch/touch-before-pressing-spin-button.html
1524
1525         * html/shadow/TextControlInnerElements.cpp:
1526         (WebCore::SpinButtonElement::defaultEventHandler):
1527         Add an assertion that m_upDownState should not be Indetermiante.
1528         Reset m_upDownState to Indeterminate when the mouse pointer moves out
1529         from the element.
1530         (WebCore::SpinButtonElement::setHovered):
1531         Reset m_upDownState to Indeterminate when the element becomes unhovered.
1532
1533 2011-12-14  Lucas Forschler  <lforschler@apple.com>
1534     
1535         https://bugs.webkit.org/show_bug.cgi?id=74543
1536         Add CSS*.cpp to a new CSSAllInOne.cpp file with two exceptions:
1537             CSSProperty.cpp
1538             CSSPrimitiveValue.cpp
1539         Adding these two broke things with a templates problem that was not easily fixable.
1540
1541         Reviewed by Steve Falkenburg.
1542
1543         * WebCore.vcproj/WebCore.vcproj:
1544         * css/CSSAllInOne.cpp: Added.
1545
1546 2011-12-14  Tim Horton  <timothy_horton@apple.com>
1547
1548         Generated images should respect the accelerated state of the context they're going to be drawn into
1549         https://bugs.webkit.org/show_bug.cgi?id=74577
1550         <rdar://problem/10584392>
1551
1552         Reviewed by Simon Fraser.
1553
1554         The tiled code path for GeneratorGeneratedImage and CrossfadeGeneratedImage blindly creates
1555         an unaccelerated ImageBuffer. Instead, take into account the accelerated state of the destination context.
1556
1557         No new tests, as this is a simple performance improvement.
1558
1559         * platform/graphics/CrossfadeGeneratedImage.cpp:
1560         (WebCore::CrossfadeGeneratedImage::drawPattern):
1561         * platform/graphics/GeneratorGeneratedImage.cpp:
1562         (WebCore::GeneratorGeneratedImage::drawPattern):
1563
1564 2011-12-14  Ilya Tikhonovsky  <loislo@chromium.org>
1565
1566         Web Inspector: cleanup unused variable introduced at r102803
1567
1568         * inspector/front-end/NetworkManager.js:
1569         (WebInspector.NetworkManager.prototype.enableResourceTracking):
1570         (WebInspector.NetworkManager.prototype.disableResourceTracking):
1571
1572 2011-12-14  Wei James  <james.wei@intel.com>
1573
1574         fast path to accelerate processing in AudioBus::processWithGainFromMonoStereo
1575         https://bugs.webkit.org/show_bug.cgi?id=74054
1576
1577         Reviewed by Kenneth Russell.
1578
1579         Avoid de-zippering when the gain has converged on the targetGain. 
1580         It can get about 75% performance gain at most when all frames don't need
1581         de-zippering.
1582
1583         * platform/audio/AudioBus.cpp:
1584         (WebCore::AudioBus::processWithGainFromMonoStereo):
1585
1586 2011-12-14  Adam Klein  <adamk@chromium.org>
1587
1588         Optimize MutationObserverInterestGroup construction
1589         https://bugs.webkit.org/show_bug.cgi?id=74563
1590
1591         Reviewed by Ojan Vafai.
1592
1593         Inline MutationObserverInterestGroup's creation methods and fix an
1594         accidental pass-by-value in an attempt to further reduce the CPU
1595         footprint of MutationObservers.
1596
1597         No new tests, refactor only.
1598
1599         * dom/WebKitMutationObserver.cpp:
1600         (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup): Pass observers HashMap by reference.
1601         * dom/WebKitMutationObserver.h:
1602         (WebCore::MutationObserverInterestGroup::createForChildListMutation): Inline.
1603         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation): Inline.
1604         (WebCore::MutationObserverInterestGroup::createForAttributesMutation): Inline.
1605         (WebCore::MutationObserverInterestGroup::hasOldValue): Remove spurious inline keyword.
1606
1607 2011-12-14  Dominic Mazzoni  <dmazzoni@google.com>
1608
1609         Seeing crash in DRT after loading-iframe-sends-notification.html land
1610         https://bugs.webkit.org/show_bug.cgi?id=72624
1611
1612         When an iframe finishes loading, send an accessibility notification
1613         on the renderer, rather than on a parent node. The only reason it was
1614         being posted on a parent before was because there was no way to detect
1615         that in a test. This is simpler and now covered by the test.
1616
1617         Reviewed by Chris Fleizach.
1618
1619         Updates existing test:
1620         accessibility/loading-iframe-sends-notification.html
1621
1622         * dom/Document.cpp:
1623         (WebCore::Document::implicitClose):
1624
1625 2011-12-14  Nat Duca  <nduca@chromium.org>
1626
1627         [chromium] Add inhibitDraw to CCScheduler and drop root impl to prevent background flash on tab restore
1628         https://bugs.webkit.org/show_bug.cgi?id=74351
1629
1630         Reviewed by James Robinson.
1631
1632         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1633         (WebCore::CCLayerTreeHost::setNeedsCommit):
1634         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
1635         * platform/graphics/chromium/cc/CCScheduler.cpp:
1636         (WebCore::CCScheduler::getNextAction):
1637         (WebCore::CCScheduler::processScheduledActions):
1638         * platform/graphics/chromium/cc/CCScheduler.h:
1639         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
1640         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
1641         (WebCore::CCSchedulerStateMachine::nextAction):
1642         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
1643         (WebCore::CCSchedulerStateMachine::setInhibitDraw):
1644         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1645         (WebCore::CCThreadProxy::setVisibleOnImplThread):
1646         (WebCore::CCThreadProxy::inhibitDraw):
1647         * platform/graphics/chromium/cc/CCThreadProxy.h:
1648
1649 2011-12-14  Ken Buchanan  <kenrb@chromium.org>
1650
1651         Crash due to incorrect parsing of isolates
1652         https://bugs.webkit.org/show_bug.cgi?id=74311
1653         When <bdi> content is wrapped, all hell breaks loose
1654         https://bugs.webkit.org/show_bug.cgi?id=74396
1655
1656         Reviewed by Eric Seidel.
1657
1658         When an isolate was encountered during run layout, the entire isolate
1659         would be parsed, even if the run started in the middle of the isolate.
1660         This would sometimes cause parts of the isolate to be added multiple
1661         times as runs. This patch marks the starting position within the
1662         isolate so nothing is parsed twice.
1663
1664         This patch changes appendRun() so that when a run is added that is
1665         inside an isolate, it saves the start position of the run rather than
1666         the root. This allows constructBidiRuns() to resume parsing the
1667         isolate from the correct position.
1668
1669         The change to RenderBox partially reverts a previous change I had
1670         done. It makes sense to screen for the condition, as was previously
1671         the case.
1672
1673         This patch does not add the test case from 74396 because a separate
1674         bug is preventing it from rendering correctly.
1675
1676         * rendering/InlineIterator.h:
1677         (WebCore::addPlaceholderRunForIsolatedInline)
1678         (WebCore::IsolateTracker::addFakeRunIfNecessary)
1679         (WebCore::InlineBidiResolver::appendRun)
1680         * rendering/RenderBlockLineLayout.cpp:
1681         (WebCore::RenderBlockLineLayout::constructBidiRuns)
1682         * rendering/RenderBox.cpp:
1683         (WebCore::RenderBox::positionLineBox)
1684
1685 2011-12-14  Jing Zhao  <jingzhao@chromium.org>
1686
1687         Opening two popup menus by dispatchEvent() makes problems.
1688         https://bugs.webkit.org/show_bug.cgi?id=73304
1689
1690         Reviewed by Kent Tamura.
1691
1692         By using element.dispatchEvent(), a user written script can open two
1693         popup menus, which causes various problems in different platforms.
1694
1695         Add a hasOpenedPopup() method in ChromeClient and a wrapper in Chrome.
1696         In RenderMenuList::showPopup(), check if there is an opened popup menu
1697         before opening a new popup menu.
1698
1699         Test: fast/forms/select-popup-crash.html
1700
1701         * loader/EmptyClients.h: Overrides hasOpenedPopup().
1702         (WebCore::EmptyChromeClient::hasOpenedPopup): Returns false as a default case.
1703         * page/Chrome.cpp:
1704         (WebCore::Chrome::hasOpenedPopup): Calls ChromeClient::hasOpenedPopup().
1705         * page/Chrome.h: Declares hasOpenedPopup().
1706         * page/ChromeClient.h: Declares hasOpenedPopup() as a pure virtual function.
1707         * rendering/RenderMenuList.cpp:
1708         (WebCore::RenderMenuList::showPopup): Calls Chrome::hasOpenedPopup() before opening a new popup menu.
1709
1710 2011-12-14  Tony Chang  <tony@chromium.org>
1711
1712         Clean up style in CSSStyleSelector.cpp
1713         https://bugs.webkit.org/show_bug.cgi?id=74548
1714
1715         Reviewed by Ojan Vafai.
1716
1717         * css/CSSStyleSelector.cpp:
1718         (WebCore::CSSStyleSelector::styleForElement):
1719         (WebCore::CSSStyleSelector::pseudoStyleForElement):
1720
1721 2011-12-14  Kenneth Russell  <kbr@google.com>
1722
1723         Unreviewed, rolling out r102794.
1724         http://trac.webkit.org/changeset/102794
1725         https://bugs.webkit.org/show_bug.cgi?id=74220
1726
1727         Reapplying patch since it is not the cause of the problems
1728         described in bug 74220.
1729
1730         * bindings/v8/V8Proxy.cpp:
1731         (WebCore::V8Proxy::reportUnsafeAccessTo):
1732         * bindings/v8/V8Proxy.h:
1733         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
1734         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
1735
1736 2011-12-14  Sam Weinig  <weinig@apple.com>
1737
1738         Remove whitespace from InheritedPropertySheets attributes in
1739         vsprops files to appease the Visual Studio project migrator.
1740
1741         Reviewed by Adam Roben.
1742
1743         * WebCore.vcproj/QTMovieWinDebug.vsprops:
1744         * WebCore.vcproj/QTMovieWinDebugAll.vsprops:
1745         * WebCore.vcproj/QTMovieWinDebugCairoCFLite.vsprops:
1746         * WebCore.vcproj/QTMovieWinProduction.vsprops:
1747         * WebCore.vcproj/QTMovieWinRelease.vsprops:
1748         * WebCore.vcproj/QTMovieWinReleaseCairoCFLite.vsprops:
1749         * WebCore.vcproj/WebCoreDebug.vsprops:
1750         * WebCore.vcproj/WebCoreDebugAll.vsprops:
1751         * WebCore.vcproj/WebCoreDebugCairoCFLite.vsprops:
1752         * WebCore.vcproj/WebCoreProduction.vsprops:
1753         * WebCore.vcproj/WebCoreRelease.vsprops:
1754         * WebCore.vcproj/WebCoreReleaseCairoCFLite.vsprops:
1755
1756 2011-12-14  Enrica Casucci  <enrica@apple.com>
1757
1758         One more attempt to fix the release build (hopefully the last)
1759
1760         Unreviewed.
1761
1762         * editing/ReplaceSelectionCommand.cpp: Added NodeRenderStyle.h
1763
1764 2011-12-14  Kenneth Russell  <kbr@google.com>
1765
1766         Unreviewed, rolling out r102816.
1767         http://trac.webkit.org/changeset/102816
1768         https://bugs.webkit.org/show_bug.cgi?id=74415
1769
1770         Implicated in font-related crashes on Chromium canaries.
1771
1772         * platform/graphics/chromium/FontChromiumWin.cpp:
1773         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
1774         (WebCore::Font::drawGlyphs):
1775         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
1776         (WebCore::FontPlatformData::FontPlatformData):
1777         (WebCore::FontPlatformData::operator=):
1778         (WebCore::FontPlatformData::~FontPlatformData):
1779         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
1780         (WebCore::FontPlatformData::size):
1781         (WebCore::FontPlatformData::hash):
1782         * platform/graphics/skia/SkiaFontWin.cpp:
1783         (WebCore::setupPaintForFont):
1784         (WebCore::paintSkiaText):
1785         * platform/graphics/skia/SkiaFontWin.h:
1786
1787 2011-12-14  Simon Fraser  <simon.fraser@apple.com>
1788
1789         Filter amounts should accept percentages
1790         https://bugs.webkit.org/show_bug.cgi?id=74531
1791
1792         Reviewed by Chris Marrin.
1793         
1794         Support percentage arguments for some filter functions, using the FPercent flag
1795         to validUnit(). Fix CSSStyleSelector::createFilterOperations() to do the divide by 100
1796         for percentages.
1797         
1798         Replaced isValidFilterArgument(), which just tested arguments one by one for validity, with
1799         parseBuiltinFilterArguments() which tests and creates the CSSValues at the same time, which
1800         is a little more efficient. It also allows filter-specific behavior to be more localized in this
1801         method.
1802
1803         Covered by existing tests.
1804
1805         * css/CSSParser.cpp:
1806         (WebCore::CSSParser::parseBuiltinFilterArguments):
1807         (WebCore::CSSParser::parseFilter):
1808         * css/CSSParser.h:
1809         * css/CSSStyleSelector.cpp:
1810         (WebCore::CSSStyleSelector::createFilterOperations):
1811
1812 2011-12-14  Enrica Casucci  <enrica@apple.com>
1813
1814         Build fix.
1815
1816         Unreviewed.
1817
1818         * editing/ReplaceSelectionCommand.cpp: Added include RenderStyle.h
1819
1820 2011-12-14  Hajime Morrita  <morrita@chromium.org>
1821
1822         JS_INLINE and WTF_INLINE should be visible from WebCore
1823         https://bugs.webkit.org/show_bug.cgi?id=73191
1824
1825         Reviewed by Kevin Ollivier.
1826
1827         - Moved export related definitions from config.h
1828           to ExportMacros.h, JSExportMacros.h and PlatformExportMacros.h
1829         - Added forwarding headers which are referred from config.h
1830
1831         No new tests. Only build related changes.
1832
1833         * ForwardingHeaders/runtime/JSExportMacros.h: Added.
1834         * ForwardingHeaders/wtf/ExportMacros.h: Added.
1835         * WebCore.xcodeproj/project.pbxproj:
1836         * config.h:
1837         * platform/PlatformExportMacros.h: Copied from Source/JavaScriptCore/wtf/ExportMacros.h.
1838
1839 2011-12-14  Enrica Casucci  <enrica@apple.com>
1840
1841         Need a way to produce leaner markup when pasting a fragment containing verbose markup
1842         https://bugs.webkit.org/show_bug.cgi?id=74514
1843         <rdar://problem/10208653>
1844
1845         Reviewed by Ryosuke Niwa.
1846
1847         This patch is another step in the direction of reducing the verbosity of the markup
1848         produced with editing operations.
1849         After the copied fragment is inserted in the document, it is analyzed to remove all
1850         the elements that don't contribute to the style. The decision is made comparing the
1851         render styles. As part of the cleanup, unstyled divs with single child element are
1852         removed. The logic to determine the blocks that can be removed is the same used in
1853         DeleteSelectionCommand and has been moved in CompositeEditCommand.
1854         
1855         Test: editing/pasteboard/paste-and-sanitize.html
1856
1857         * editing/CompositeEditCommand.cpp:
1858         (WebCore::CompositeEditCommand::isRemovableBlock): Implements logic to determine
1859         if a block can be removed.
1860         * editing/CompositeEditCommand.h: Added isRemovableBlock declaration.
1861         * editing/DeleteSelectionCommand.cpp:
1862         (WebCore::DeleteSelectionCommand::removeRedundantBlocks): Implemented using
1863         isRemovableBlock from CompositeEditCommand.
1864         * editing/Editor.cpp:
1865         (WebCore::Editor::replaceSelectionWithFragment): Added SanitizeFragment option.
1866         * editing/ReplaceSelectionCommand.cpp:
1867         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand): Added initialization
1868         of m_sanitizeFragment member.
1869         (WebCore::ReplaceSelectionCommand::removeRedundantMarkup): New method implementing
1870         the cleanup logic.
1871         (WebCore::ReplaceSelectionCommand::doApply): Added call to removeRedundantMarkup
1872         after the fragment is inserted in the document.
1873         * editing/ReplaceSelectionCommand.h: Added new value to the enum CommandOption,
1874         a new member variable and the new method declaration.
1875
1876 2011-12-14  Adrienne Walker  <enne@google.com>
1877
1878         [chromium] Refactor tile drawing to be more data-driven
1879         https://bugs.webkit.org/show_bug.cgi?id=73059
1880
1881         Reviewed by James Robinson.
1882
1883         Partially tested by compositor layout tests. Debug borders and
1884         checkerboarding tested manually.
1885
1886         This is the first part of a move towards rendering quads on screen
1887         from a bag of data rather than in virtual CCLayerImpl::draw functions.
1888
1889         CCDrawQuad-derived classes store material-specific pieces of data to
1890         use when rendering. CCLayerImpl classes now create these CCDrawQuad
1891         objects rather than issuing direct GL commands. Where this data is
1892         shared between quads that come from the same layer, that data is
1893         stored in a CCSharedQuadState object rather than duplicated.
1894
1895         CCRenderPass is the class that holds the list of quads and the target
1896         surface that they draw into. Drawing a frame consists of drawing a
1897         series of render passes onto their respective surfaces.
1898
1899         CCLayerTreeHostImpl constructs these render passes from the output of
1900         calculateDrawTransformsAndVisibility by asking each layer to insert
1901         quads into a list and hands them off to LayerRendererChromium for
1902         rendering.
1903
1904         * WebCore.gypi:
1905         * platform/graphics/chromium/LayerRendererChromium.cpp:
1906         (WebCore::LayerRendererChromium::clearSurfaceForDebug):
1907         (WebCore::LayerRendererChromium::beginDrawingFrame):
1908         (WebCore::LayerRendererChromium::drawRenderPass):
1909         (WebCore::LayerRendererChromium::drawQuad):
1910         (WebCore::LayerRendererChromium::drawDebugBorderQuad):
1911         (WebCore::LayerRendererChromium::drawRenderSurfaceQuad):
1912         (WebCore::LayerRendererChromium::drawSolidColorQuad):
1913         (WebCore::tileUniformLocation):
1914         (WebCore::findTileProgramUniforms):
1915         (WebCore::LayerRendererChromium::drawTileQuad):
1916         (WebCore::LayerRendererChromium::drawCustomLayerQuad):
1917         (WebCore::LayerRendererChromium::finishDrawingFrame):
1918         (WebCore::LayerRendererChromium::useRenderSurface):
1919         * platform/graphics/chromium/LayerRendererChromium.h:
1920         * platform/graphics/chromium/ShaderChromium.h:
1921         (WebCore::FragmentTexAlphaBinding::edgeLocation):
1922         (WebCore::FragmentTexAlphaBinding::fragmentTexTransformLocation):
1923         (WebCore::FragmentTexOpaqueBinding::edgeLocation):
1924         (WebCore::FragmentTexOpaqueBinding::fragmentTexTransformLocation):
1925         * platform/graphics/chromium/TiledLayerChromium.cpp:
1926         (WebCore::TiledLayerChromium::pushPropertiesTo):
1927         * platform/graphics/chromium/cc/CCCustomLayerDrawQuad.cpp: Added.
1928         (WebCore::CCCustomLayerDrawQuad::create):
1929         (WebCore::CCCustomLayerDrawQuad::CCCustomLayerDrawQuad):
1930         * platform/graphics/chromium/cc/CCCustomLayerDrawQuad.h: Added.
1931         (WebCore::CCCustomLayerDrawQuad::layer):
1932         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: Added.
1933         (WebCore::CCDebugBorderDrawQuad::create):
1934         (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
1935         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h: Added.
1936         (WebCore::CCDebugBorderDrawQuad::color):
1937         (WebCore::CCDebugBorderDrawQuad::width):
1938         * platform/graphics/chromium/cc/CCDrawQuad.cpp: Added.
1939         (WebCore::CCDrawQuad::CCDrawQuad):
1940         (WebCore::CCDrawQuad::toDebugBorderDrawQuad):
1941         (WebCore::CCDrawQuad::toRenderSurfaceDrawQuad):
1942         (WebCore::CCDrawQuad::toSolidColorDrawQuad):
1943         (WebCore::CCDrawQuad::toTileDrawQuad):
1944         (WebCore::CCDrawQuad::toCustomLayerDrawQuad):
1945         * platform/graphics/chromium/cc/CCDrawQuad.h: Added.
1946         (WebCore::CCDrawQuad::quadRect):
1947         (WebCore::CCDrawQuad::quadTransform):
1948         (WebCore::CCDrawQuad::layerTransform):
1949         (WebCore::CCDrawQuad::layerRect):
1950         (WebCore::CCDrawQuad::clipRect):
1951         (WebCore::CCDrawQuad::opacity):
1952         (WebCore::CCDrawQuad::drawsOpaque):
1953         (WebCore::CCDrawQuad::needsBlending):
1954         (WebCore::CCDrawQuad::isLayerAxisAlignedIntRect):
1955         (WebCore::CCDrawQuad::material):
1956         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1957         (WebCore::CCLayerImpl::createSharedQuadState):
1958         (WebCore::CCLayerImpl::appendQuads):
1959         (WebCore::CCLayerImpl::appendDebugBorderQuad):
1960         (WebCore::CCLayerImpl::quadTransform):
1961         * platform/graphics/chromium/cc/CCLayerImpl.h:
1962         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1963         (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces):
1964         (WebCore::computeScreenSpaceTransformForSurface):
1965         (WebCore::damageInSurfaceSpace):
1966         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1967         (WebCore::CCLayerTreeHostImpl::drawLayers):
1968         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1969         * platform/graphics/chromium/cc/CCRenderPass.cpp: Added.
1970         (WebCore::CCRenderPass::create):
1971         (WebCore::CCRenderPass::CCRenderPass):
1972         (WebCore::CCRenderPass::appendQuadsForLayer):
1973         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
1974         * platform/graphics/chromium/cc/CCRenderPass.h: Added.
1975         (WebCore::CCRenderPass::quadList):
1976         (WebCore::CCRenderPass::targetSurface):
1977         (WebCore::CCRenderPass::setSurfaceDamageRect):
1978         (WebCore::CCRenderPass::surfaceDamageRect):
1979         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp: Added.
1980         (WebCore::CCRenderSurfaceDrawQuad::create):
1981         (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad):
1982         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h: Added.
1983         (WebCore::CCRenderSurfaceDrawQuad::layer):
1984         (WebCore::CCRenderSurfaceDrawQuad::surfaceDamageRect):
1985         * platform/graphics/chromium/cc/CCSharedQuadState.cpp: Added.
1986         (WebCore::CCSharedQuadState::create):
1987         (WebCore::CCSharedQuadState::CCSharedQuadState):
1988         (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
1989         * platform/graphics/chromium/cc/CCSharedQuadState.h: Added.
1990         (WebCore::CCSharedQuadState::quadTransform):
1991         (WebCore::CCSharedQuadState::layerTransform):
1992         (WebCore::CCSharedQuadState::layerRect):
1993         (WebCore::CCSharedQuadState::clipRect):
1994         (WebCore::CCSharedQuadState::opacity):
1995         (WebCore::CCSharedQuadState::isOpaque):
1996         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: Added.
1997         (WebCore::CCSolidColorDrawQuad::create):
1998         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
1999         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h: Added.
2000         (WebCore::CCSolidColorDrawQuad::color):
2001         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp: Added.
2002         (WebCore::CCTileDrawQuad::create):
2003         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
2004         * platform/graphics/chromium/cc/CCTileDrawQuad.h: Added.
2005         (WebCore::CCTileDrawQuad::textureId):
2006         (WebCore::CCTileDrawQuad::textureOffset):
2007         (WebCore::CCTileDrawQuad::textureSize):
2008         (WebCore::CCTileDrawQuad::textureFilter):
2009         (WebCore::CCTileDrawQuad::swizzleContents):
2010         (WebCore::CCTileDrawQuad::leftEdgeAA):
2011         (WebCore::CCTileDrawQuad::topEdgeAA):
2012         (WebCore::CCTileDrawQuad::rightEdgeAA):
2013         (WebCore::CCTileDrawQuad::bottomEdgeAA):
2014         (WebCore::CCTileDrawQuad::isAntialiased):
2015         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2016         (WebCore::CCTiledLayerImpl::CCTiledLayerImpl):
2017         (WebCore::CCTiledLayerImpl::quadTransform):
2018         (WebCore::CCTiledLayerImpl::appendQuads):
2019         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2020         (WebCore::CCTiledLayerImpl::setContentsSwizzled):
2021         (WebCore::CCTiledLayerImpl::contentsSwizzled):
2022
2023 2011-12-14  Ojan Vafai  <ojan@chromium.org>
2024
2025         Implement flexDirection and flexWrap and make flexFlow a proper shorthand.
2026         https://bugs.webkit.org/show_bug.cgi?id=74542
2027
2028         Reviewed by Tony Chang.
2029
2030         In a followup patch, I'll cleanup all the *Flow methods in RenderFlexibleBox.
2031
2032         Existing tests cover all the rendering behaviors, so only need to test
2033         the css property parsing.
2034
2035         * css/CSSComputedStyleDeclaration.cpp:
2036         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2037         * css/CSSMutableStyleDeclaration.cpp:
2038         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
2039         * css/CSSParser.cpp:
2040         (WebCore::CSSParser::parseValue):
2041         * css/CSSPrimitiveValueMappings.h:
2042         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2043         (WebCore::CSSPrimitiveValue::operator EFlexDirection):
2044         * css/CSSProperty.cpp:
2045         (WebCore::CSSProperty::isInheritedProperty):
2046         * css/CSSPropertyLonghand.cpp:
2047         (WebCore::initShorthandMap):
2048         * css/CSSPropertyNames.in:
2049         * css/CSSStyleApplyProperty.cpp:
2050         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2051         * css/CSSStyleSelector.cpp:
2052         (WebCore::CSSStyleSelector::applyProperty):
2053         * rendering/RenderBox.cpp:
2054         (WebCore::RenderBox::sizesToIntrinsicLogicalWidth):
2055         * rendering/RenderFlexibleBox.cpp:
2056         (WebCore::RenderFlexibleBox::isColumnFlow):
2057         (WebCore::RenderFlexibleBox::isLeftToRightFlow):
2058         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2059         (WebCore::RenderFlexibleBox::alignChildren):
2060         * rendering/style/RenderStyle.h:
2061         (WebCore::InheritedFlags::flexDirection):
2062         (WebCore::InheritedFlags::isColumnFlexDirection):
2063         (WebCore::InheritedFlags::setFlexDirection):
2064         (WebCore::InheritedFlags::initialFlexDirection):
2065         * rendering/style/RenderStyleConstants.h:
2066         * rendering/style/StyleFlexibleBoxData.cpp:
2067         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
2068         (WebCore::StyleFlexibleBoxData::operator==):
2069         * rendering/style/StyleFlexibleBoxData.h:
2070
2071 2011-12-13  Jon Lee  <jonlee@apple.com>
2072
2073         Enable notifications on Mac.
2074
2075         Reviewed by Sam Weinig.
2076
2077         * Configurations/FeatureDefines.xcconfig:
2078
2079 2011-12-14  Ryosuke Niwa  <rniwa@webkit.org>
2080
2081         COMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows
2082         https://bugs.webkit.org/show_bug.cgi?id=74327
2083
2084         Reviewed by Darin Adler.
2085
2086         Always use unsigned instead of bool and unsigned in the bitfields of RuleData to shrink
2087         its size under MSVC.
2088
2089         Unlike gcc and clang, MSVC pads each consecutive member variables of the same type
2090         in bitfields. e.g. if you have:
2091         sturct AB {
2092             unsigned m_1 : 31;
2093             bool m_2 : 1;
2094         }
2095         then MSVC pads m_1 and allocates sizeof(unsigned) * 2 for AB whereas gcc and clang
2096         only allocate sizeof(unsigned) * 1 for AB.
2097
2098         * css/CSSStyleSelector.cpp:
2099         (WebCore::RuleData::RuleData):
2100
2101 2011-12-14  Ryosuke Niwa  <rniwa@webkit.org>
2102
2103         NodeChildList shouldn't be in NodeListNodeData
2104         https://bugs.webkit.org/show_bug.cgi?id=73969
2105
2106         Reviewed by Sam Weinig.
2107
2108         Move NodeChildList out of NodeListNodeData to separate it from the other node lists in order to
2109         resolve the bug 73853. Unlike other DynamicNodeList, we don't need to invalidate NodeChildList
2110         on ancestors when children change. Moving ChildNodeList out of NodeListNodeData makes this difference
2111         apparent and makes DynamicNodeList::Caches in NodeListNodeData always held by a DynamicSubtreeNodeList,
2112         eliminating the need for hasOwnCaches() checks in various places.
2113
2114         Also renamed the existing DynamicNodeList to DynamicSubtreeNodeList and re-introduced DynamicNodeList
2115         from which DynamicSubtreeNodeList and ChildNodeList both inherit to share the code for itemWithName.
2116
2117         In addition, renamed registerDynamicNodeList and unregisterDynamicNodeList, which updates a counter for
2118         TreeScope::hasNodeListCaches, to registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList
2119         respectively. They are no longer called by ChildNodeList in order to avoid walking up the DOM tree
2120         inside invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged.
2121
2122         Test: fast/dom/childnode-item-after-itemname.html
2123
2124         * bindings/js/JSNodeListCustom.cpp:
2125         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
2126         * dom/ChildNodeList.cpp:
2127         (WebCore::ChildNodeList::ChildNodeList):
2128         (WebCore::ChildNodeList::length):
2129         (WebCore::ChildNodeList::item):
2130         (WebCore::ChildNodeList::nodeMatches):
2131         * dom/ChildNodeList.h:
2132         * dom/ClassNodeList.cpp:
2133         (WebCore::ClassNodeList::ClassNodeList):
2134         (WebCore::ClassNodeList::~ClassNodeList):
2135         * dom/ClassNodeList.h:
2136         * dom/ContainerNode.cpp:
2137         (WebCore::ContainerNode::childrenChanged):
2138         * dom/DynamicNodeList.cpp:
2139         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
2140         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
2141         (WebCore::DynamicSubtreeNodeList::length):
2142         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
2143         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
2144         (WebCore::DynamicSubtreeNodeList::item):
2145         (WebCore::DynamicNodeList::itemWithName):
2146         (WebCore::DynamicSubtreeNodeList::isDynamicNodeList):
2147         (WebCore::DynamicSubtreeNodeList::invalidateCache):
2148         (WebCore::DynamicSubtreeNodeList::Caches::Caches):
2149         (WebCore::DynamicSubtreeNodeList::Caches::create):
2150         (WebCore::DynamicSubtreeNodeList::Caches::reset):
2151         * dom/DynamicNodeList.h:
2152         (WebCore::DynamicNodeList::DynamicNodeList):
2153         (WebCore::DynamicNodeList::~DynamicNodeList):
2154         (WebCore::DynamicNodeList::node):
2155         (WebCore::DynamicSubtreeNodeList::rootNode):
2156         * dom/NameNodeList.cpp:
2157         (WebCore::NameNodeList::NameNodeList):
2158         (WebCore::NameNodeList::~NameNodeList):
2159         * dom/NameNodeList.h:
2160         * dom/Node.cpp:
2161         (WebCore::Node::childNodes):
2162         (WebCore::Node::registerDynamicSubtreeNodeList):
2163         (WebCore::Node::unregisterDynamicSubtreeNodeList):
2164         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
2165         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged):
2166         (WebCore::Node::removeCachedClassNodeList):
2167         (WebCore::Node::removeCachedNameNodeList):
2168         (WebCore::Node::removeCachedTagNodeList):
2169         (WebCore::Node::removeCachedLabelsNodeList):
2170         (WebCore::NodeListsNodeData::invalidateCaches):
2171         (WebCore::NodeListsNodeData::isEmpty):
2172         (WebCore::NodeRareData::clearChildNodeListCache):
2173         * dom/Node.h:
2174         * dom/NodeRareData.h:
2175         (WebCore::NodeRareData::nodeLists):
2176         (WebCore::NodeRareData::ensureChildNodeListCache):
2177         * dom/TagNodeList.cpp:
2178         (WebCore::TagNodeList::TagNodeList):
2179         (WebCore::TagNodeList::~TagNodeList):
2180         * dom/TagNodeList.h:
2181         * html/LabelsNodeList.cpp:
2182         (WebCore::LabelsNodeList::LabelsNodeList):
2183         * html/LabelsNodeList.h:
2184
2185 2011-12-14  Ryosuke Niwa  <rniwa@webkit.org>
2186
2187         Push more member functions from EditCommand to CompositeEditCommand
2188         https://bugs.webkit.org/show_bug.cgi?id=74249
2189
2190         Reviewed by Enrica Casucci.
2191
2192         Moved startingRootEditableElement and endingRootEditableElement from EditCommand to EditCommandComposition,
2193         and isTypingCommand, preservesTypingStyle, shouldRetainAutocorrectionIndicator,
2194         setShouldRetainAutocorrectionIndicator, and shouldStopCaretBlinking from EditCommand to CompositeEditCommand.
2195         Also removed EditCommand::updateLayout().
2196
2197         * editing/ApplyBlockElementCommand.cpp:
2198         (WebCore::ApplyBlockElementCommand::doApply):
2199         * editing/ApplyStyleCommand.cpp:
2200         (WebCore::ApplyStyleCommand::applyBlockStyle):
2201         (WebCore::ApplyStyleCommand::applyInlineStyle):
2202         * editing/CompositeEditCommand.cpp:
2203         (WebCore::EditCommandComposition::EditCommandComposition):
2204         (WebCore::EditCommandComposition::setStartingSelection):
2205         (WebCore::EditCommandComposition::setEndingSelection):
2206         (WebCore::CompositeEditCommand::preservesTypingStyle):
2207         (WebCore::CompositeEditCommand::isTypingCommand):
2208         (WebCore::CompositeEditCommand::shouldRetainAutocorrectionIndicator):
2209         (WebCore::CompositeEditCommand::setShouldRetainAutocorrectionIndicator):
2210         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
2211         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
2212         (WebCore::CompositeEditCommand::moveParagraphs):
2213         * editing/CompositeEditCommand.h:
2214         (WebCore::EditCommandComposition::startingRootEditableElement):
2215         (WebCore::EditCommandComposition::endingRootEditableElement):
2216         (WebCore::CompositeEditCommand::shouldStopCaretBlinking):
2217         * editing/DeleteSelectionCommand.cpp:
2218         (WebCore::DeleteSelectionCommand::removeNode):
2219         (WebCore::DeleteSelectionCommand::fixupWhitespace):
2220         * editing/EditCommand.cpp:
2221         (WebCore::EditCommand::apply):
2222         (WebCore::EditCommand::unapply):
2223         (WebCore::EditCommand::reapply):
2224         (WebCore::EditCommand::setStartingSelection):
2225         (WebCore::EditCommand::setEndingSelection):
2226         (WebCore::EditCommand::setParent):
2227         * editing/EditCommand.h:
2228         (WebCore::EditCommand::isEditCommandComposition):
2229         * editing/Editor.cpp:
2230         (WebCore::dispatchEditableContentChangedEvents):
2231         (WebCore::Editor::appliedEditing):
2232         (WebCore::Editor::unappliedEditing):
2233         (WebCore::Editor::reappliedEditing):
2234         * editing/Editor.h:
2235         (WebCore::Editor::lastEditCommand):
2236         * editing/FrameSelection.cpp:
2237         (WebCore::FrameSelection::updateAppearance):
2238         * editing/IndentOutdentCommand.cpp:
2239         (WebCore::IndentOutdentCommand::outdentParagraph):
2240         * editing/InsertLineBreakCommand.cpp:
2241         (WebCore::InsertLineBreakCommand::doApply):
2242         * editing/InsertParagraphSeparatorCommand.cpp:
2243         (WebCore::InsertParagraphSeparatorCommand::doApply):
2244         * editing/TypingCommand.cpp:
2245         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
2246         * editing/TypingCommand.h:
2247         (WebCore::TypingCommand::shouldRetainAutocorrectionIndicator):
2248
2249 2011-12-14  Tony Chang  <tony@chromium.org>
2250
2251         Fix compile on gcc on Mac.
2252
2253         css/CSSStyleSelector.cpp:1254:166: error: unused parameter 'regionForStyling' [-Werror,-Wunused-parameter,3]
2254         css/CSSStyleSelector.cpp:1425:134: error: unused parameter 'regionForStyling' [-Werror,-Wunused-parameter,3]
2255
2256         * css/CSSStyleSelector.cpp:
2257         (WebCore::CSSStyleSelector::styleForElement):
2258         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2259
2260 2011-12-14  Brady Eidson  <beidson@apple.com>
2261
2262         <rdar://problem/10576732> and https://bugs.webkit.org/show_bug.cgi?id=74533
2263         REGRESSION(r102619): Reproducible crash closing window with video + poster image inside an object element
2264
2265         Reviewed by Darin Adler.
2266
2267         Test: media/crash-closing-page-with-media-as-plugin-fallback.html
2268
2269         Switch HTMLPlugInImageElement from using document activation callbacks to using the ActiveDOMObject
2270         mechanism which will prevent the unnecessary (and crashy) work at Document teardown:
2271         * html/HTMLPlugInImageElement.cpp:
2272         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
2273         (WebCore::HTMLPlugInImageElement::canSuspend):
2274         (WebCore::HTMLPlugInImageElement::suspend):
2275         (WebCore::HTMLPlugInImageElement::resume):
2276         * html/HTMLPlugInImageElement.h:
2277
2278 2011-12-14  Adrienne Walker  <enne@google.com>
2279
2280         [chromium] Compositor needs to set texture filtering on canvas layers
2281         https://bugs.webkit.org/show_bug.cgi?id=74530
2282
2283         Reviewed by James Robinson.
2284
2285         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
2286         (WebCore::CCCanvasLayerImpl::draw):
2287
2288 2011-12-14  Tony Chang  <tony@chromium.org>
2289
2290         Remove added calls to CSSStyleSelector to gain back another 2% in page cyclers
2291         https://bugs.webkit.org/show_bug.cgi?id=74537
2292
2293         Reviewed by Ojan Vafai.
2294
2295         In r102234, calls to initForRegionStyling() were added in CSSStyleSelector.
2296         There's still a 2% perf regression in chromium page cyclers, so try removing
2297         these calls.
2298
2299         * css/CSSStyleSelector.cpp:
2300         (WebCore::CSSStyleSelector::styleForElement):
2301         (WebCore::CSSStyleSelector::pseudoStyleForElement):
2302
2303 2011-12-14  Jonathan Backer  <backer@chromium.org>
2304
2305         [chromium] Plumb through flag for enabling partial swap
2306         https://bugs.webkit.org/show_bug.cgi?id=74513
2307
2308         Reviewed by James Robinson.
2309
2310         * page/Settings.h:
2311         (WebCore::Settings::setPartialSwapEnabled):
2312         (WebCore::Settings::partialSwapEnabled):
2313         * platform/graphics/chromium/LayerRendererChromium.cpp:
2314         (WebCore::LayerRendererChromium::initialize):
2315         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2316         (WebCore::CCSettings::CCSettings):
2317
2318 2011-12-14  Mike Reed  <reed@google.com>
2319
2320         [skia] cache typeface in FontPlatformData
2321         https://bugs.webkit.org/show_bug.cgi?id=74415
2322
2323         Reviewed by Stephen White.
2324
2325         No new tests. Existing tests apply, this is just an optimization
2326         to avoid looking up the typeface on each drawText call.
2327
2328         * platform/graphics/chromium/FontChromiumWin.cpp:
2329         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
2330         (WebCore::Font::drawGlyphs):
2331         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
2332         (WebCore::createTypefaceFromHFont):
2333         (WebCore::FontPlatformData::FontPlatformData):
2334         (WebCore::FontPlatformData::operator=):
2335         (WebCore::FontPlatformData::~FontPlatformData):
2336         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
2337         (WebCore::FontPlatformData::typeface):
2338         (WebCore::FontPlatformData::lfQuality):
2339         (WebCore::FontPlatformData::hash):
2340         (WebCore::FontPlatformData::operator==):
2341         * platform/graphics/skia/SkiaFontWin.cpp:
2342         (WebCore::setupPaintForFont):
2343         (WebCore::paintSkiaText):
2344         * platform/graphics/skia/SkiaFontWin.h:
2345
2346 2011-12-14  Simon Fraser  <simon.fraser@apple.com>
2347
2348         Make -webkit-filter animatable
2349         https://bugs.webkit.org/show_bug.cgi?id=68476
2350
2351         Reviewed by Chris Marrin.
2352         
2353         Add -webkit-filter to the list of CSS properties that are animatable. Animate
2354         it like we do transforms, by looking for matching lists of filter functions.
2355         Each kind of filter operation has a blend() method that handles blending
2356         for that filter.
2357
2358         Test: css3/filters/filter-animation.html
2359
2360         * GNUmakefile.list.am: Add FilterOperation.cpp to the build.
2361         * Target.pri: Ditto
2362         * WebCore.gypi: Ditto
2363         * WebCore.vcproj/WebCore.vcproj: Ditto
2364         * WebCore.xcodeproj/project.pbxproj: Ditto
2365         * page/animation/AnimationBase.cpp:
2366         (WebCore::blendFunc): New blendFunc() for FilterOperations, which does per-filter blending.
2367         (WebCore::AnimationBase::ensurePropertyMap): Make PropertyWrapper for filters.
2368         (WebCore::AnimationBase::AnimationBase): Adjust initialization order.
2369         * page/animation/AnimationBase.h: Adjusted the member variable order to minimize padding.
2370         (WebCore::AnimationBase::filterFunctionListsMatch): Accessor for the flag.
2371         * page/animation/ImplicitAnimation.cpp:
2372         (WebCore::ImplicitAnimation::reset):
2373         (WebCore::ImplicitAnimation::validateTransformFunctionList): Adjust comment. The "is valid" terminology is confusing.
2374         (WebCore::ImplicitAnimation::checkForMatchingFilterFunctionLists): New method to check for matching lists
2375         of filter functions.
2376         * page/animation/ImplicitAnimation.h:
2377         * page/animation/KeyframeAnimation.cpp:
2378         (WebCore::KeyframeAnimation::KeyframeAnimation):
2379         (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists): New method to check for matching lists
2380         of filter functions.
2381         * page/animation/KeyframeAnimation.h:
2382         * rendering/style/FilterOperation.cpp: Added.
2383         (WebCore::BasicColorMatrixFilterOperation::blend):
2384         (WebCore::BasicColorMatrixFilterOperation::passthroughAmount):
2385         (WebCore::BasicComponentTransferFilterOperation::blend):
2386         (WebCore::BasicComponentTransferFilterOperation::passthroughAmount): Different filters have
2387         different values for m_amount for the "passthrough" behavior. This method returns the appropriate value.
2388         (WebCore::GammaFilterOperation::blend):
2389         (WebCore::BlurFilterOperation::blend):
2390         (WebCore::DropShadowFilterOperation::blend):
2391         * rendering/style/FilterOperation.h:
2392         (WebCore::FilterOperation::blend):
2393         (WebCore::PassthroughFilterOperation::create): New "no-op" filter.
2394         (WebCore::PassthroughFilterOperation::operator==):
2395         (WebCore::PassthroughFilterOperation::PassthroughFilterOperation):
2396         * rendering/style/FilterOperations.cpp:
2397         (WebCore::FilterOperations::operationsMatch):
2398         * rendering/style/FilterOperations.h:
2399
2400 2011-12-14  Adam Klein  <adamk@chromium.org>
2401
2402         Broaden support for mutation observation of attributes
2403         https://bugs.webkit.org/show_bug.cgi?id=74448
2404
2405         Reviewed by Ryosuke Niwa.
2406
2407         The previously-landed MutationObserver support for attributes was incomplete:
2408         it didn't support mutations related to Attr nodes (methods on Attrs,
2409         setAttributeNode/removeAttributeNode on Element, or methods on NamedNodeMap).
2410
2411         This patch adds full support of mutation observation for all these cases,
2412         and adds test cases for all these situations.
2413
2414         * dom/Attr.cpp:
2415         (WebCore::Attr::setValue): Enqueue a mutation record when Attr.value is set from JS.
2416         (WebCore::Attr::childrenChanged): Enqueue a mutation record when an Attr's value
2417         changes to due additions/removals of Text children.
2418         * dom/Element.cpp:
2419         (WebCore::Element::enqueueAttributesMutationRecordIfRequested): Previously a static,
2420         expose as part of Element's interface to allow it to be re-used by NamedNodeMap and Attr.
2421         (WebCore::Element::removeAttribute): Remove enqueue call now handled by NamedNodeMap.
2422         (WebCore::Element::setAttributeInternal): Fixup call of enqueueAttributesMutationRecordIfRequested.
2423         * dom/Element.h:
2424         * dom/NamedNodeMap.cpp:
2425         (WebCore::NamedNodeMap::setNamedItem): Enqueue a mutation record when an attribute
2426         is changed via Element.attributes.setNamedItem from JS.
2427         (WebCore::NamedNodeMap::removeNamedItem): Enqueue a mutation record when an
2428         attribute is removed, either via Element.attributes.removeNamedItem or Element.removeAttribute.
2429
2430 2011-12-14  Raymond Toy  <rtoy@google.com>
2431
2432         * platform/audio/Distance.h (WebCore): 
2433
2434         Incorrect calculation for DistanceEffect linearGain
2435         https://bugs.webkit.org/show_bug.cgi?id=72871
2436
2437         Reviewed by Kenneth Russell.
2438
2439         Tests still need to be written for all distance models.  This
2440         does not add a new API and just corrects an implementation error. 
2441
2442         * platform/audio/Distance.cpp:
2443         (WebCore::DistanceEffect::linearGain): Implement correct
2444         linearGain function.  (Fix proposed by davidgaleano@hotmail.com.)
2445         * platform/audio/Distance.h: Add link to Open AL specification. 
2446         
2447
2448 2011-12-14  Ilya Tikhonovsky  <loislo@chromium.org>
2449
2450         Web Inspector: consider disabling network tracking while running the CPU profile.
2451         https://bugs.webkit.org/show_bug.cgi?id=74221
2452
2453         The WebCore instrumentation on the backend affects the performance of inspected page.
2454         As the result the CPU profiler's stats data are far away from the reality.
2455         Solution: the profiler code will temporary disable the resource tracking on backend.
2456         Side effect: the resource tree gets out of sinc because it uses Network Agent's notifications for updating the resource tree.
2457         Solution: NetworkManager will report about the changes of the resource tracking state and ResourcePanel will re-fetch the resources tree.
2458
2459         Reviewed by Pavel Feldman.
2460
2461         * inspector/front-end/NetworkManager.js:
2462         (WebInspector.NetworkManager.prototype.enableResourceTracking.networkAgentEnabled):
2463         (WebInspector.NetworkManager.prototype.enableResourceTracking):
2464         (WebInspector.NetworkManager.prototype.disableResourceTracking.networkAgentDisabled):
2465         (WebInspector.NetworkManager.prototype.disableResourceTracking):
2466         (WebInspector.NetworkManager.prototype.inflightResourceForURL):
2467         * inspector/front-end/ProfileView.js:
2468         (WebInspector.CPUProfileType.prototype.buttonClicked):
2469         * inspector/front-end/ResourceTreeModel.js:
2470         (WebInspector.ResourceTreeModel):
2471         (WebInspector.ResourceTreeModel.prototype._onResourceTrackingEnabled):
2472
2473 2011-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2474
2475         [GTK] Fix PlatformScreen::screenAvailableRect when there's no view widget
2476         https://bugs.webkit.org/show_bug.cgi?id=74520
2477
2478         Reviewed by Martin Robinson.
2479
2480         Use the default screen to get the available screen area instead of
2481         just returning an empty rectangle. This is useful for WebKit2,
2482         since there's no view widget in the web process.
2483
2484         * platform/gtk/PlatformScreenGtk.cpp:
2485         (WebCore::screenAvailableRect):
2486
2487 2011-12-14  Eric Carlson  <eric.carlson@apple.com>
2488
2489         Media url with fragment may not load
2490         https://bugs.webkit.org/show_bug.cgi?id=74443
2491
2492         Reviewed by Darin Adler.
2493
2494         Test: media/media-extension-with-fragment.html
2495
2496         * html/HTMLMediaElement.cpp:
2497         (WebCore::HTMLMediaElement::loadResource): Pass the KURL to MediaPlayer, let it extract a
2498             String when it needs it.
2499
2500         * platform/graphics/MediaPlayer.cpp:
2501         (WebCore::MediaPlayer::load): Take a KURL, not a String. Look for the file extension in the 
2502             last path component so we don't examine fragments and/or queries.
2503         * platform/graphics/MediaPlayer.h:
2504
2505 2011-12-14  Jacky Jiang  <zhajiang@rim.com>
2506
2507         [BlackBerry] Remove some duplicate entries in Source/WebCore/PlatformBlackBerry.cmake
2508         https://bugs.webkit.org/show_bug.cgi?id=74484
2509
2510         Reviewed by Daniel Bates.
2511
2512         Trivial fix, so no new tests.
2513
2514         * PlatformBlackBerry.cmake:
2515
2516 2011-12-14  Anders Carlsson  <andersca@apple.com>
2517
2518         Add back the callOnMainThread overload that takes a WTF::Function
2519         https://bugs.webkit.org/show_bug.cgi?id=74512
2520
2521         Reviewed by Darin Adler.
2522
2523         Explicitly qualify the Function enum flag, since MSVC2005 is too stupid to disambiguate
2524         the Function class template and the enum flag.
2525
2526         * bindings/js/JSDOMWindowCustom.cpp:
2527         (WebCore::JSDOMWindow::getOwnPropertySlot):
2528         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
2529         * bindings/js/JSHistoryCustom.cpp:
2530         (WebCore::JSHistory::getOwnPropertySlotDelegate):
2531         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
2532         * bindings/js/JSLocationCustom.cpp:
2533         (WebCore::JSLocation::getOwnPropertySlotDelegate):
2534         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
2535
2536 2011-12-14  Kenneth Russell  <kbr@google.com>
2537
2538         Unreviewed, rolling out r102688.
2539         http://trac.webkit.org/changeset/102688
2540         https://bugs.webkit.org/show_bug.cgi?id=74220
2541
2542         Under the hypothesis that it might be the cause of
2543         browser_tests and ui_tests crashes on Chromium canaries --
2544         will reland if not.
2545
2546         * bindings/v8/V8Proxy.cpp:
2547         (WebCore::addMessageToConsole):
2548         (WebCore::logInfo):
2549         (WebCore::V8Proxy::reportUnsafeAccessTo):
2550         * bindings/v8/V8Proxy.h:
2551         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
2552         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2553
2554 2011-12-14  Vsevolod Vlasov  <vsevik@chromium.org>
2555
2556         Web Inspector: DatabaseTableView should escape table name.
2557         https://bugs.webkit.org/show_bug.cgi?id=74503
2558
2559         Reviewed by Pavel Feldman.
2560
2561         Test: inspector/database-table-name-excaping.html
2562
2563         * inspector/front-end/DatabaseTableView.js:
2564         (WebInspector.DatabaseTableView.prototype._escapeTableName):
2565         (WebInspector.DatabaseTableView.prototype.update):
2566
2567 2011-12-14  Philippe Normand  <pnormand@igalia.com>
2568
2569         [GStreamer] padTemplate leak in webkitwebaudiosrc
2570         https://bugs.webkit.org/show_bug.cgi?id=74495
2571
2572         Reviewed by Martin Robinson.
2573
2574         Use a GstPadTemplate smart pointer in webkit_web_audio_src_init to
2575         avoid a memory leak after the ghost pad creation.
2576
2577         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2578         (webkit_web_audio_src_init):
2579         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
2580         (WTF::adoptGRef):
2581         (WTF::GstPadTemplate):
2582         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
2583
2584 2011-12-14  Julien Chaffraix  <jchaffraix@webkit.org>
2585
2586         Crash in RenderBox::paintBoxDecorations when documentElement has no renderer
2587         https://bugs.webkit.org/show_bug.cgi?id=64284
2588
2589         Reviewed by Ryosuke Niwa.
2590
2591         Test: fast/dynamic/crash-paint-no-documentElement-renderer.html
2592
2593         * rendering/RenderBox.cpp:
2594         (WebCore::RenderBox::paintBackground): Check the documentElement's
2595         renderer before using it which matches what RenderView does.
2596
2597 2011-12-14  Tom Sepez  <tsepez@chromium.org>
2598
2599         DocumentLoader should ref its mainResourceLoader.
2600         https://bugs.webkit.org/show_bug.cgi?id=74424
2601
2602         Reviewed by Adam Barth.
2603
2604         Tests: platform/chromium/http/tests/security/mixedContent/insecure-iframe-in-main-frame-allowed.html
2605                platform/chromium/http/tests/security/mixedContent/insecure-iframe-in-main-frame-blocked.html
2606
2607         * loader/DocumentLoader.cpp:
2608         (WebCore::DocumentLoader::startLoadingMainResource):
2609         * loader/MainResourceLoader.cpp:
2610         (WebCore::MainResourceLoader::loadNow):
2611
2612 2011-12-14  Stephen White  <senorblanco@chromium.org>
2613
2614         CSS Filters should support GPU acceleration
2615         https://bugs.webkit.org/show_bug.cgi?id=74441
2616
2617         Reviewed by Darin Adler.
2618
2619         Will be covered by existing CSS filters tests, when run in GPU mode.
2620
2621         * rendering/FilterEffectRenderer.cpp:
2622         (WebCore::FilterEffectRenderer::prepare):
2623         * rendering/RenderLayer.cpp:
2624         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
2625
2626 2011-12-14  Brian Salomon  <bsalomon@google.com>
2627
2628         [CHROMIUM/SKIA] Handle put[Un/Pre]multipliedImageData conversions in Skia rather than ImageBuffer
2629         https://bugs.webkit.org/show_bug.cgi?id=73953
2630
2631         Reviewed by Stephen White.
2632
2633         Tested by existing canvas2d layout tests.
2634
2635         * platform/graphics/skia/ImageBufferSkia.cpp:
2636         (WebCore::putImageData):
2637         (WebCore::ImageBuffer::putUnmultipliedImageData):
2638         (WebCore::ImageBuffer::putPremultipliedImageData):
2639
2640 2011-12-14  Mary Wu  <mary.wu@torchmobile.com.cn>
2641
2642         Remove SharedBufferBlackBerry.cpp from WebCore/platform/blackberry
2643         https://bugs.webkit.org/show_bug.cgi?id=74488
2644
2645         Reviewed by Rob Buis.
2646
2647         Remove dead code, no new tests.
2648
2649         * platform/blackberry/SharedBufferBlackBerry.cpp: Removed.
2650
2651 2011-12-14  Kentaro Hara  <haraken@chromium.org>
2652
2653         Use [Supplemental] IDL in WebSocket
2654         https://bugs.webkit.org/show_bug.cgi?id=74160
2655
2656         Reviewed by Adam Barth.
2657
2658         By using the [Supplemental] IDL, this patch moves declarations of WebSocket
2659         attributes from DOMWindow.idl to websocket/DOMWindowWebSocket.idl,
2660         which helps make WebSocket a self-contained module.
2661
2662         No new tests, no change in behavior.
2663         Confirm that http/tests/websocket/* pass.
2664
2665         * WebCore.gypi: Added DOMWindowWebSocket.idl.
2666         * page/DOMWindow.idl: Added the [Supplemented] IDL to WebSocket-related attributes. This [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL (See bug 73394 for more details).
2667         * websockets/DOMWindowWebSocket.idl: Added. Used the [Supplemental=DOMWindow] IDL. The attributes in this IDL file are treated as if they are described in DOMWindow.idl.
2668
2669 2011-12-14  Pierre Rossi  <pierre.rossi@gmail.com>
2670
2671         Unreviewed fix. Broke qt minimal release compilation.
2672
2673         * platform/qt/RenderThemeQtMobile.cpp:
2674
2675 2011-12-14  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2676
2677         Add different salt to different types of selectors. So the CSS fast
2678         path can tell the different between tags and class attributes with
2679         otherwise identical values.
2680         https://bugs.webkit.org/show_bug.cgi?id=74284
2681
2682         Reviewed by Antti Koivisto.
2683
2684         * css/SelectorChecker.cpp:
2685         (WebCore::collectElementIdentifierHashes):
2686         (WebCore::collectDescendantSelectorIdentifierHashes):
2687         * css/SelectorChecker.h:
2688
2689 2011-12-14  Pierre Rossi  <pierre.rossi@gmail.com>
2690
2691         [Qt] Mobile theme could use a little refresh
2692         https://bugs.webkit.org/show_bug.cgi?id=74293
2693
2694         The look and feel of the "mobile theme" we're
2695         using in QtWebKit dates back to the maemo 5 days.
2696         This is an attempt at making it look less out of
2697         place, and also support progress and range.
2698
2699         Reviewed by Kenneth Rohde Christiansen.
2700
2701         No new tests, this is still not the default theme
2702         for tests.
2703
2704         * DerivedSources.pri:
2705         * css/mobileThemeQt.css: Added.
2706         (input[type="submit"], select):
2707         (input[type="submit"]:disabled, input[type="submit"]:disabled:active, select:disabled, input[type="text"]:disabled):
2708         (input[type="submit"]:active):
2709         * platform/qt/RenderThemeQt.cpp:
2710         (WebCore::RenderThemeQt::extraDefaultStyleSheet):
2711         (WebCore::StylePainter::StylePainter):
2712         (WebCore::StylePainter::init):
2713         (WebCore::StylePainter::~StylePainter):
2714         * platform/qt/RenderThemeQt.h:
2715         * platform/qt/RenderThemeQtMobile.cpp:
2716         (WebCore::drawRectangularControlBackground):
2717         (WebCore::shrinkRectToSquare):
2718         (WebCore::StylePainterMobile::StylePainterMobile):
2719         (WebCore::StylePainterMobile::~StylePainterMobile):
2720         (WebCore::StylePainterMobile::drawCheckableBackground):
2721         (WebCore::StylePainterMobile::sizeForPainterScale):
2722         (WebCore::StylePainterMobile::drawChecker):
2723         (WebCore::StylePainterMobile::findCheckBox):
2724         (WebCore::StylePainterMobile::drawRadio):
2725         (WebCore::StylePainterMobile::findRadio):
2726         (WebCore::StylePainterMobile::drawMultipleComboButton):
2727         (WebCore::StylePainterMobile::drawSimpleComboButton):
2728         (WebCore::StylePainterMobile::getButtonImageSize):
2729         (WebCore::StylePainterMobile::findComboButton):
2730         (WebCore::StylePainterMobile::drawLineEdit):
2731         (WebCore::StylePainterMobile::drawCheckBox):
2732         (WebCore::StylePainterMobile::drawRadioButton):
2733         (WebCore::StylePainterMobile::drawPushButton):
2734         (WebCore::StylePainterMobile::drawComboBox):
2735         (WebCore::StylePainterMobile::drawProgress):
2736         (WebCore::StylePainterMobile::drawSliderThumb):
2737         (WebCore::RenderThemeQtMobile::paintButton):
2738         (WebCore::RenderThemeQtMobile::paintTextField):
2739         (WebCore::RenderThemeQtMobile::setPopupPadding):
2740         (WebCore::RenderThemeQtMobile::paintMenuList):
2741         (WebCore::RenderThemeQtMobile::paintMenuListButton):
2742         (WebCore::RenderThemeQtMobile::animationDurationForProgressBar):
2743         (WebCore::RenderThemeQtMobile::paintProgressBar):
2744         (WebCore::RenderThemeQtMobile::paintSliderTrack):
2745         (WebCore::RenderThemeQtMobile::paintSliderThumb):
2746         (WebCore::RenderThemeQtMobile::adjustSliderThumbSize):
2747         * platform/qt/RenderThemeQtMobile.h:
2748
2749 2011-12-14  Rakesh KN  <rakesh.kn@motorola.com>
2750
2751         [Non-Mac] Change event should be fired when changing option by using keyboard.
2752         https://bugs.webkit.org/show_bug.cgi?id=74384
2753
2754         Reviewed by Kent Tamura.
2755
2756         Fire onchange event when option is changed using up/down/right/left/pageup/pagedown/home/end keys.
2757
2758         Test: fast/forms/select/menulist-onchange-fired-with-key-up-down.html
2759
2760         * html/HTMLSelectElement.cpp:
2761         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2762         Setting the DispatchChangeEvent selection option flag when the option is selected using
2763         up/down/right/left/pageup/pagedown/home/end keys.
2764
2765 2011-12-13  Vsevolod Vlasov  <vsevik@chromium.org>
2766
2767         Web Inspector: TreeOutline's is broken when li elements have padding-left different from 14px.
2768         https://bugs.webkit.org/show_bug.cgi?id=74445
2769
2770         Reviewed by Pavel Feldman.
2771
2772         * inspector/front-end/treeoutline.js:
2773         (TreeElement.prototype.isEventWithinDisclosureTriangle):
2774
2775 2011-12-13  Vsevolod Vlasov  <vsevik@chromium.org>
2776
2777         Web Inspector: [Regression] Scripts panel debug sidebar toolbar should not be scrolled out of the screen.
2778         https://bugs.webkit.org/show_bug.cgi?id=74447
2779
2780         Reviewed by Pavel Feldman.
2781
2782         * inspector/front-end/ScriptsPanel.js:
2783         (WebInspector.ScriptsPanel.prototype.wasShown):
2784         * inspector/front-end/scriptsPanel.css:
2785         (#scripts-debug-toolbar):
2786         (#scripts-debug-sidebar-contents):
2787
2788 2011-12-14  Alexander Færøy  <alexander.faeroy@nokia.com>
2789
2790         [Qt] DeviceOrientationClientMockQt should be removed in favor of DeviceOrientationClientMock
2791         https://bugs.webkit.org/show_bug.cgi?id=74417
2792
2793         Reviewed by Simon Hausmann.
2794
2795         Based on original patch by Kenneth Christiansen.
2796
2797         Already covered by current tests.
2798
2799         * dom/DeviceOrientationController.h:
2800         (WebCore::DeviceOrientationController::client):
2801
2802 2011-12-14  Jacky Jiang  <zhajiang@rim.com>
2803
2804         [BlackBerry] Switch to libjpeg for decoding
2805         https://bugs.webkit.org/show_bug.cgi?id=74475
2806
2807         Reviewed by Daniel Bates.
2808
2809         Switch to cross platform JPEG image decoder for decoding as this keeps
2810         us inline with other ports and less to maintain.
2811
2812         * PlatformBlackBerry.cmake:
2813
2814 2011-12-03  Philippe Normand  <pnormand@igalia.com>
2815
2816         [GTK] Bad text rendering since r101343
2817         https://bugs.webkit.org/show_bug.cgi?id=73744
2818
2819         Reviewed by Martin Robinson.
2820
2821         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2822         (WebCore::setCairoFontOptionsFromFontConfigPattern): Keep Cairo
2823         hint metrics unchanged for better visual font rendering results.
2824
2825 2011-12-13  Hajime Morrita  <morrita@chromium.org>
2826
2827         Unreviewed attempt for fixing windows build.
2828
2829         - Included <wtf/MathExtras.h> which defined portable version of lround().
2830         - Add some static_cast<> to suppress warnings.
2831
2832         * platform/animation/AnimationUtilities.h:
2833         (WebCore::blend):
2834
2835 2011-12-13  Wei Charles  <charles.wei@torchmobile.com.cn>
2836
2837         [BlackBerry] Add the new plugin files into the build system.
2838         https://bugs.webkit.org/show_bug.cgi?id=74483
2839
2840         Reviewed by Daniel Bates.
2841
2842         No new tests, just add new files to the build system.
2843
2844         * PlatformBlackBerry.cmake:
2845
2846 2011-12-13  Yosifumi Inoue  <yosin@chromium.org>
2847
2848         [Forms] Default selection of select(menulist) should not be disabled
2849         https://bugs.webkit.org/show_bug.cgi?id=74270
2850
2851         Reviewed by Kent Tamura.
2852
2853         This patch changes default selection of select(menulist) element to
2854           1. Selected option element. If there are multiple options which have
2855              selected state, we pick the largest index option up. (same as current)
2856           2. Non-disabled option element (new behavior)
2857           3. The first option if all options are disabled. (new behavior)
2858
2859         Tests: fast/forms/select/menulist-disabled-option-expected.html
2860                fast/forms/select/menulist-disabled-option.html
2861
2862         * html/HTMLSelectElement.cpp:
2863         (WebCore::HTMLSelectElement::recalcListItems): Implement new logic for selection.
2864
2865 2011-12-13  Simon Fraser  <simon.fraser@apple.com>
2866
2867         Share blend progress code
2868         https://bugs.webkit.org/show_bug.cgi?id=74464
2869
2870         Reviewed by Dean Jackson.
2871         
2872         Lots of places in the code had copies of the animation interpolation
2873         logic "from + (to - from) * progress", in various forms.
2874         
2875         Coalesce all these into calls to a few new inline functions in a new
2876         AnimationUtilities.h header. Color and Length get their own blend fuctions
2877         in their respective headers.
2878
2879         Covered by existing tests.
2880
2881         * GNUmakefile.list.am:
2882         * Target.pri:
2883         * WebCore.gypi:
2884         * WebCore.vcproj/WebCore.vcproj:
2885         * WebCore.xcodeproj/project.pbxproj:
2886         * css/CSSGradientValue.cpp:
2887         * page/animation/AnimationBase.cpp:
2888         (WebCore::blendFunc):
2889         * platform/Length.h:
2890         (WebCore::Length::blend):
2891         * platform/animation/AnimationUtilities.h: Added.
2892         (WebCore::blend):
2893         * platform/graphics/Color.h:
2894         (WebCore::blend):
2895         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
2896         (WebCore::PerspectiveTransformOperation::blend):
2897         * platform/graphics/transforms/RotateTransformOperation.cpp:
2898         (WebCore::RotateTransformOperation::blend):
2899         * platform/graphics/transforms/ScaleTransformOperation.cpp:
2900         (WebCore::ScaleTransformOperation::blend):
2901         * platform/graphics/transforms/SkewTransformOperation.cpp:
2902         (WebCore::SkewTransformOperation::blend):
2903         * platform/graphics/transforms/TranslateTransformOperation.cpp:
2904         (WebCore::TranslateTransformOperation::blend):
2905         * svg/SVGLength.h:
2906         (WebCore::SVGLength::blend):
2907         * svg/SVGPathBlender.cpp:
2908         (WebCore::blendFloatPoint):
2909         (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
2910         (WebCore::SVGPathBlender::blendArcToSegment):
2911
2912 2011-12-13  Mary Wu  <mary.wu@torchmobile.com.cn>
2913
2914         Upstream 3 files into WebCore/platform/blackberry
2915         ClipboardBlackBerry.cpp/h, PasteboardBlackBerry.cpp
2916         https://bugs.webkit.org/show_bug.cgi?id=74381
2917
2918         Reviewed by Rob Buis.
2919
2920         Main contributor:
2921         Mike Fenton <mifenton@rim.com>
2922
2923         Initial upstream, no new tests.
2924
2925         * platform/blackberry/ClipboardBlackBerry.cpp: Added.
2926         * platform/blackberry/ClipboardBlackBerry.h: Added.
2927         * platform/blackberry/PasteboardBlackBerry.cpp: Added.
2928
2929 2011-12-13  James Robinson  <jamesr@chromium.org>
2930
2931         Unreviewed, rolling out r102726.
2932         http://trac.webkit.org/changeset/102726
2933         https://bugs.webkit.org/show_bug.cgi?id=74154
2934
2935         Does not compile on clang
2936
2937         * platform/graphics/chromium/TiledLayerChromium.cpp:
2938         (WebCore::UpdatableTile::UpdatableTile):
2939         (WebCore::TiledLayerChromium::createTile):
2940         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2941         (WebCore::CCLayerTilingData::addTile):
2942         (WebCore::CCLayerTilingData::takeTile):
2943         (WebCore::CCLayerTilingData::tileAt):
2944         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2945         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2946         (WebCore::DrawableTile::DrawableTile):
2947         (WebCore::CCTiledLayerImpl::createTile):
2948
2949 2011-12-13  Hajime Morrita  <morrita@chromium.org>
2950
2951         Unreviewed, rolling out r102732.
2952         http://trac.webkit.org/changeset/102732
2953
2954         The last fix makes no sense...
2955
2956         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2957
2958 2011-12-13  Hajime Morrita  <morrita@chromium.org>
2959
2960         HTML details summary not working with form controls
2961         https://bugs.webkit.org/show_bug.cgi?id=74398
2962
2963         Reviewed by Kent Tamura.
2964
2965         Allowed HTMLSummaryElement to skip the toggle logic if the event
2966         target is a form control.
2967
2968         Test: fast/html/details-click-controls.html
2969
2970         * html/HTMLSummaryElement.cpp:
2971         (WebCore::isClickableControl):
2972         (WebCore::HTMLSummaryElement::defaultEventHandler):
2973
2974 2011-12-13  James Wei <james.wei@intel.com> 
2975
2976         Optimize to not use pow() in the inner loop in AudioParamTimeline
2977         https://bugs.webkit.org/show_bug.cgi?id=73530
2978
2979         Reviewed by Kenneth Russell.
2980
2981         No new tests.
2982
2983         * webaudio/AudioParamTimeline.cpp:
2984         (WebCore:AudioParamTimeline:valuesForTimeRangeImpl):
2985
2986 2011-12-13  Hajime Morrita  <morrita@chromium.org>
2987
2988         Unreviewed Chromium-Mac build fix trial.
2989
2990         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2991
2992 2011-12-13  David Reveman  <reveman@chromium.org>
2993
2994         [Chromium] Initialize Settings::m_perTileDrawingEnabled properly.
2995         https://bugs.webkit.org/show_bug.cgi?id=74476
2996
2997         Reviewed by James Robinson.
2998
2999         Add m_perTileDrawingEnabled(false) to WebCore::Settings initialize list.
3000
3001         No new tests.
3002
3003         * page/Settings.cpp:
3004         (WebCore::Settings::Settings):
3005
3006 2011-12-13  Anders Carlsson  <andersca@apple.com>
3007
3008         Add a very bare-bones implementation of bind and Function to WTF
3009         https://bugs.webkit.org/show_bug.cgi?id=74462
3010
3011         Reviewed by Sam Weinig.
3012
3013         Add a forwarding header for Functional.h.
3014
3015         * ForwardingHeaders/wtf/Functional.h: Added.
3016
3017 2011-12-13  Adrienne Walker  <enne@google.com>
3018
3019         [chromium] Use HashMap<..., OwnPtr<Tile>> for compositor tilemap
3020         https://bugs.webkit.org/show_bug.cgi?id=74154
3021
3022         Reviewed by James Robinson.
3023
3024         After r102410 landed, it's now possible to properly use an OwnPtr to
3025         store tiles rather than hackily use a RefPtr.
3026
3027         Covered by the compositing/ layout tests.
3028
3029         * platform/graphics/chromium/TiledLayerChromium.cpp:
3030         (WebCore::UpdatableTile::create):
3031         (WebCore::UpdatableTile::UpdatableTile):
3032         (WebCore::TiledLayerChromium::createTile):
3033         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
3034         (WebCore::CCLayerTilingData::addTile):
3035         (WebCore::CCLayerTilingData::takeTile):
3036         (WebCore::CCLayerTilingData::tileAt):
3037         * platform/graphics/chromium/cc/CCLayerTilingData.h:
3038         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3039         (WebCore::DrawableTile::create):
3040         (WebCore::DrawableTile::DrawableTile):
3041         (WebCore::CCTiledLayerImpl::createTile):
3042
3043 2011-12-13  Dmitry Lomov  <dslomov@google.com>
3044
3045         https://bugs.webkit.org/show_bug.cgi?id=73691
3046         [JSC] Implement correct order of window.postMessage arguments.
3047         This change supports a new signature of windowPostMessage:
3048           postMessage(message, targetOrigin[, transferrables])
3049         as well as the legacy webkit-proprietary:
3050           postMessage(message, [transferrables,] targetOrigin)
3051         The latter is only supported for cases when targetOrigin is a String.
3052
3053         Reviewed by David Levin.
3054
3055         * bindings/js/JSDOMWindowCustom.cpp:
3056         (WebCore::handlePostMessage):
3057         * page/DOMWindow.idl:
3058
3059 2011-12-13  Rafael Weinstein  <rafaelw@chromium.org>
3060
3061         [MutationObservers] Avoid allocations if no observers are present
3062         https://bugs.webkit.org/show_bug.cgi?id=74423
3063
3064         Reviewed by Ojan Vafai.
3065
3066         This patch adds Node::mayHaveMutationObserversOfType which can be used to check
3067         if there are any observers at all which could receive a give type of mutation.
3068         MutationObserverInterestGroup uses this to possibly exit early (returning
3069         null) if no observers are present.
3070
3071         No tests needed. This patch is just a refactor.
3072
3073         * css/CSSMutableStyleDeclaration.cpp:
3074         * dom/CharacterData.cpp:
3075         (WebCore::CharacterData::dispatchModifiedEvent):
3076         * dom/ChildListMutationScope.cpp:
3077         (WebCore::ChildListMutationAccumulator::MutationAccumulationRouter::incrementScopingLevel):
3078         * dom/Element.cpp:
3079         (WebCore::enqueueAttributesMutationRecord):
3080         * dom/Node.cpp:
3081         (WebCore::Node::mayHaveMutationObserversOfType):
3082         * dom/Node.h:
3083         * dom/WebKitMutationObserver.cpp:
3084         (WebCore::MutationObserverInterestGroup::createIfNeeded):
3085         (WebCore::MutationObserverInterestGroup::createForChildListMutation):
3086         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
3087         (WebCore::MutationObserverInterestGroup::createForAttributesMutation):
3088         (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
3089         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
3090         * dom/WebKitMutationObserver.h:
3091
3092 2011-12-13  Robin Dunn  <robin@alldunn.com>
3093
3094         Don't make the bitmap transparent when using theme drawing
3095         calls that don't support transparent bitmaps.
3096         https://bugs.webkit.org/show_bug.cgi?id=74319
3097
3098         Reviewed by Kevin Ollivier.
3099
3100         * platform/wx/LocalDC.h:
3101         (WebCore::LocalDC::LocalDC):
3102         * platform/wx/RenderThemeWx.cpp:
3103         (WebCore::RenderThemeWx::paintButton):
3104
3105 2011-12-13  Tony Chang  <tony@chromium.org>
3106
3107         Inline all of initForRegionStyling except for the rarely used part for non-null regions.
3108         https://bugs.webkit.org/show_bug.cgi?id=74435
3109
3110         Reviewed by Andreas Kling.
3111
3112         * css/CSSStyleSelector.cpp:
3113         (WebCore::CSSStyleSelector::initForRegionStyling): Inline setting of m_regionForStyling
3114         (WebCore::CSSStyleSelector::initRegionRules): Move code that only
3115         applies to CSSRegions into non-inlined code.
3116         * css/CSSStyleSelector.h:
3117
3118 2011-12-13  James Simonsen  <simonjam@chromium.org>
3119
3120         Unreviewed, Chromium Mac build fix.
3121
3122         * page/PerformanceTiming.h:
3123
3124 2011-12-13  Adam Klein  <adamk@chromium.org>
3125
3126         Update variable names in NamedNodeMap methods to match WebKit style
3127         https://bugs.webkit.org/show_bug.cgi?id=74437
3128
3129         Reviewed by Ojan Vafai.
3130
3131         While reading these methods in preparation for a refactor, I found
3132         them hard to understand due to short or confusing variable names.
3133         I think the new names are much clearer, and match WebKit style.
3134
3135         * dom/NamedNodeMap.cpp:
3136         (WebCore::NamedNodeMap::setNamedItem):
3137         (WebCore::NamedNodeMap::removeNamedItem):
3138
3139 2011-12-13  Xingnan Wang  <xingnan.wang@intel.com>
3140
3141         Implement a function of vector multiply with SSE2 optimization in VectorMath.cpp.
3142         https://bugs.webkit.org/show_bug.cgi?id=74048
3143
3144         Reviewed by Benjamin Poulain.
3145
3146         The vmul is a function for an element-by-element multiply of two float vectors and we 
3147         get about 3.4x performance improvement with SSE2 optimization compared with the common 
3148         multiply.
3149
3150         Use vmul in AudioBus::copyWithSampleAccurateGainValuesFrom().
3151
3152         * platform/audio/AudioBus.cpp:
3153         (WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom):
3154         * platform/audio/VectorMath.cpp:
3155         (WebCore::VectorMath::vmul):
3156         * platform/audio/VectorMath.h:
3157
3158 2011-12-13  Vsevolod Vlasov  <vsevik@chromium.org>
3159
3160         Web Inspector: [Regression] ResourceHeadersView sections should be expanded by default.
3161         https://bugs.webkit.org/show_bug.cgi?id=74434
3162
3163         Reviewed by Pavel Feldman.
3164
3165         * inspector/front-end/treeoutline.js:
3166
3167 2011-12-13  Vsevolod Vlasov  <vsevik@chromium.org>
3168
3169         Web Inspector: Network item view does not correctly decode "+" in request parameters.
3170         https://bugs.webkit.org/show_bug.cgi?id=74422
3171
3172         Reviewed by Pavel Feldman.
3173
3174         Test: http/tests/inspector/network/request-parameters-decoding.html
3175
3176         * inspector/front-end/ResourceHeadersView.js:
3177         (WebInspector.ResourceHeadersView.prototype._formatParameter):
3178         (WebInspector.ResourceHeadersView.prototype._refreshParms):
3179
3180 2011-12-13  Alok Priyadarshi  <alokp@chromium.org>
3181
3182         [chromium] compositing/masks layout tests fail with accelerated drawing
3183         https://bugs.webkit.org/show_bug.cgi?id=72760
3184
3185         Reviewed by Stephen White.
3186
3187         Accelerated drawing path used to render bottom-up upright textures, which was opposite of what the software path rendered.
3188         The textures produced by the accelerated path was flipped along Y in the shader to make it upside down as expected by the compositor.
3189         This strategy does not work in case of masks which do not go through a shader and hence do not get flipped,
3190         which results in a case where texture in the render surface is top-down, while that in the mask is bottom-up.
3191         This patch makes accelerated drawing path render textures in the same orientation as the software path.
3192         LayerTextureUpdater::Orientation was added to support the difference in texture orientation between software and accelerated paths.
3193         Now that both paths produce textures in the same orientation, there is no need for it.
3194
3195         No new tests needed. Covered by existing compositing tests.
3196
3197         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
3198         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
3199         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
3200         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
3201         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
3202         * platform/graphics/chromium/ImageLayerChromium.cpp:
3203         * platform/graphics/chromium/LayerTextureUpdater.h:
3204         * platform/graphics/chromium/TiledLayerChromium.cpp:
3205         (WebCore::TiledLayerChromium::TiledLayerChromium):
3206         (WebCore::TiledLayerChromium::setLayerTreeHost):
3207         (WebCore::TiledLayerChromium::pushPropertiesTo):
3208         * platform/graphics/chromium/TiledLayerChromium.h:
3209         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3210         (WebCore::CCTiledLayerImpl::drawTiles):
3211         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3212         (WebCore::CCTiledLayerImpl::setSkipsDraw):
3213
3214 2011-12-09  Zhenyao Mo  <zmo@google.com>
3215
3216         Implement GLES2 CheckFramebufferStatus() behavior
3217         https://bugs.webkit.org/show_bug.cgi?id=74228
3218
3219         Reviewed by Kenneth Russell.
3220
3221         * html/canvas/WebGLFramebuffer.cpp:
3222         (WebCore::WebGLFramebuffer::getColorBufferWidth): Add ColorBuffer to the function name - this is more accurate.
3223         (WebCore::WebGLFramebuffer::getColorBufferHeight): Ditto.
3224         (WebCore::WebGLFramebuffer::checkStatus): Implement full semantics of GLES2 glCheckFramebufferStatus().
3225         (WebCore::WebGLFramebuffer::onAccess): Call checkStatus().
3226         * html/canvas/WebGLFramebuffer.h:
3227         * html/canvas/WebGLRenderingContext.cpp:
3228         (WebCore::WebGLRenderingContext::checkFramebufferStatus): Call checkStatus().
3229         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): No longer check framebuffer status.
3230         (WebCore::WebGLRenderingContext::getBoundFramebufferWidth): Call getColorBufferWidth.
3231         (WebCore::WebGLRenderingContext::getBoundFramebufferHeight): Call getColorBufferHeight.
3232
3233 2011-12-13  James Simonsen  <simonjam@chromium.org>
3234
3235         [Navigation Timing] Use monotonicallyIncreasingTime() instead of currentTime()
3236         https://bugs.webkit.org/show_bug.cgi?id=58354
3237
3238         Reviewed by Pavel Feldman.
3239
3240         No new tests. Relies on existing webtiming-* tests.
3241
3242         * CMakeLists.txt:
3243         * GNUmakefile.list.am:
3244         * WebCore.gypi:
3245         * WebCore.pro:
3246         * WebCore.vcproj/WebCore.vcproj:
3247         * WebCore.xcodeproj/project.pbxproj:
3248         * dom/Document.cpp: Use monotonic times.
3249         (WebCore::Document::setReadyState):
3250         (WebCore::Document::finishedParsing):
3251         * inspector/InspectorInstrumentation.cpp:
3252         (WebCore::InspectorInstrumentation::didFinishLoadingImpl): Convert monotonicFinishTime to wall time if needed.
3253         * inspector/InspectorResourceAgent.cpp:
3254         (WebCore::buildObjectForTiming): Convert monotonic requestTime to wall time.
3255         (WebCore::buildObjectForResourceResponse): Plumbing for above.
3256         (WebCore::buildObjectForCachedResource): Ditto.
3257         (WebCore::InspectorResourceAgent::willSendRequest): Ditto.
3258         (WebCore::InspectorResourceAgent::didReceiveResponse): Ditto.
3259         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): Ditto.
3260         * loader/DocumentLoadTiming.cpp: Added.
3261         (WebCore::DocumentLoadTiming::DocumentLoadTiming):
3262         (WebCore::DocumentLoadTiming::setNavigationStart): Determine reference time and root reference time.
3263         (WebCore::DocumentLoadTiming::addRedirect): Moved logic from MainResourceLoader.
3264         (WebCore::DocumentLoadTiming::convertMonotonicTimeToDocumentTime): Helper to compute wall time from monotonic time.
3265         * loader/DocumentLoadTiming.h: Turned into class. Made times monotonic.
3266         (WebCore::DocumentLoadTiming::setUnloadEventStart):
3267         (WebCore::DocumentLoadTiming::setUnloadEventEnd):
3268         (WebCore::DocumentLoadTiming::setRedirectStart):
3269         (WebCore::DocumentLoadTiming::setRedirectEnd):
3270         (WebCore::DocumentLoadTiming::setFetchStart):
3271         (WebCore::DocumentLoadTiming::setResponseEnd):
3272         (WebCore::DocumentLoadTiming::setLoadEventStart):
3273         (WebCore::DocumentLoadTiming::setLoadEventEnd):
3274         (WebCore::DocumentLoadTiming::setHasSameOriginAsPreviousDocument):
3275         (WebCore::DocumentLoadTiming::navigationStart):
3276         (WebCore::DocumentLoadTiming::unloadEventStart):
3277         (WebCore::DocumentLoadTiming::unloadEventEnd):
3278         (WebCore::DocumentLoadTiming::redirectStart):
3279         (WebCore::DocumentLoadTiming::redirectEnd):
3280         (WebCore::DocumentLoadTiming::redirectCount):
3281         (WebCore::DocumentLoadTiming::fetchStart):
3282         (WebCore::DocumentLoadTiming::responseEnd):
3283         (WebCore::DocumentLoadTiming::loadEventStart):
3284         (WebCore::DocumentLoadTiming::loadEventEnd):
3285         (WebCore::DocumentLoadTiming::hasCrossOriginRedirect):
3286         (WebCore::DocumentLoadTiming::hasSameOriginAsPreviousDocument):
3287         * loader/FrameLoader.cpp:
3288         (WebCore::FrameLoader::stopLoading):
3289         (WebCore::FrameLoader::commitProvisionalLoad):
3290         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm):
3291         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
3292         * loader/MainResourceLoader.cpp:
3293         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
3294         (WebCore::MainResourceLoader::willSendRequest): Moved logic to DocumentLoadTiming.
3295         (WebCore::MainResourceLoader::didReceiveData): Use monotonic time.
3296         (WebCore::MainResourceLoader::didFinishLoading): Ditto.
3297         (WebCore::MainResourceLoader::load):
3298         * page/DOMWindow.cpp:
3299         (WebCore::DOMWindow::dispatchLoadEvent):
3300         * page/DOMWindow.h: Removed dispatchTimedEvent. It doesn't really help in the new model.
3301         * page/PerformanceNavigation.cpp:
3302         (WebCore::PerformanceNavigation::redirectCount):
3303         * page/PerformanceTiming.cpp: Removed skew correction code. This should never happen now.
3304         (WebCore::PerformanceTiming::navigationStart):
3305         (WebCore::PerformanceTiming::unloadEventStart):
3306         (WebCore::PerformanceTiming::unloadEventEnd):
3307         (WebCore::PerformanceTiming::redirectStart):
3308         (WebCore::PerformanceTiming::redirectEnd):
3309         (WebCore::PerformanceTiming::fetchStart):
3310         (WebCore::PerformanceTiming::responseEnd):
3311         (WebCore::PerformanceTiming::domLoading):
3312         (WebCore::PerformanceTiming::domInteractive):
3313         (WebCore::PerformanceTiming::domContentLoadedEventStart):
3314         (WebCore::PerformanceTiming::domContentLoadedEventEnd):
3315         (WebCore::PerformanceTiming::domComplete):
3316         (WebCore::PerformanceTiming::loadEventStart):
3317         (WebCore::PerformanceTiming::loadEventEnd):
3318         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Used for ResourceLoadTiming.
3319         (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds): Used for DocumentTiming and DocumentLoadTiming.
3320         * page/PerformanceTiming.h:
3321         * platform/network/ResourceLoadTiming.cpp:
3322         (WebCore::ResourceLoadTiming::convertResourceLoadTimeToDocumentTime):
3323         * platform/network/ResourceLoadTiming.h: Added helper function to convert to wall times. Added instructions for use.
3324
3325 2011-12-13  Adam Klein  <adamk@chromium.org>
3326
3327         Reduce code duplication in Element::setAttribute methods
3328         https://bugs.webkit.org/show_bug.cgi?id=74425
3329
3330         Reviewed by Ryosuke Niwa.
3331
3332         Two overloads of Element::setAttribute share almost all their code,
3333         including tricky logic around updating the appropriate Attribute and
3334         Attr objects and notifying the Inspector and MutationObservers.
3335
3336         This patch puts the common logic in a new setAttributeInternal method
3337         which is called by the other two.
3338
3339         No new tests, refactoring only.
3340
3341         * dom/Element.cpp:
3342         (WebCore::Element::setAttribute):
3343         (WebCore::Element::setAttributeInternal):
3344         * dom/Element.h:
3345
3346 2011-12-13  Brady Eidson  <beidson@apple.com>
3347
3348         <http://webkit.org/b/74420> Disable deprecation warnings around more code where we 
3349         cannot easily switch away from the deprecated APIs.
3350
3351         Reviewed by Mark Rowe.
3352
3353         * bindings/objc/DOMInternal.mm:
3354         * bridge/objc/objc_instance.mm:
3355
3356 2011-12-12  Robert Hogan  <robert@webkit.org>
3357
3358         CSS 2.1 failure: eof-002.htm fails
3359         https://bugs.webkit.org/show_bug.cgi?id=74309
3360
3361         Reviewed by Dean Jackson.
3362
3363         Test: css2.1/20110323/eof-002-expected.html
3364
3365         * css/CSSGrammar.y: Treat EOF during a function expression with an open parenthesis as a close parenthesis.
3366
3367 2011-12-13  Adam Klein  <adamk@chromium.org>
3368
3369         V8Proxy cleanup: replace custom logging methods with standard WebCore calls
3370         https://bugs.webkit.org/show_bug.cgi?id=74220
3371
3372         Reviewed by Adam Barth.
3373
3374         * bindings/v8/V8Proxy.cpp:
3375         (WebCore::V8Proxy::reportUnsafeAccessTo):
3376         * bindings/v8/V8Proxy.h:
3377         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
3378         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
3379
3380 2011-12-13  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3381
3382         [Qt] Get rid of layering violations in includes
3383
3384         WebKit/qt/API and WebKit/qt/WebCoreSupport should not be included
3385         in the webcore.prf, but rather in each target that specificly needs
3386         headers in these location. We used to include them directly in webcore
3387         since we had layering violations between WebCore and WebKit, but now
3388         that they are gone there's no reason to do that.
3389
3390         Reviewed by Simon Hausmann.
3391
3392         * bridge/qt/qt_instance.cpp:
3393         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3394         * platform/graphics/qt/ImageQt.cpp:
3395         * platform/network/qt/QNetworkReplyHandler.cpp:
3396         * platform/network/qt/ResourceHandleQt.cpp:
3397         * platform/qt/CookieJarQt.cpp:
3398         * platform/qt/RenderThemeQStyle.cpp:
3399         * platform/qt/RenderThemeQt.cpp:
3400
3401 2011-12-13  Vsevolod Vlasov  <vsevik@chromium.org>
3402
3403         Web Inspector: Add scripts navigator sidebar to scripts panel.
3404         https://bugs.webkit.org/show_bug.cgi?id=73086
3405
3406         Reviewed by Pavel Feldman.
3407
3408         * WebCore.gypi:
3409         * WebCore.vcproj/WebCore.vcproj:
3410         * inspector/compile-front-end.sh:
3411         * inspector/front-end/Images/domain.png: Added.
3412         * inspector/front-end/JavaScriptSourceFrame.js:
3413         (WebInspector.JavaScriptSourceFrame.prototype.suggestedFileName):
3414         * inspector/front-end/ScriptsNavigator.js: Added.
3415         * inspector/front-end/ScriptsPanel.js:
3416         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if):
3417         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
3418         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
3419         (WebInspector.ScriptsPanel.prototype._reset):
3420         (WebInspector.ScriptsPanel.prototype._removeSourceFrame):
3421         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
3422         (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded):
3423         (WebInspector.ScriptsPanel.prototype._updateExecutionLine):
3424         (WebInspector.ScriptsPanel.prototype._scriptSelectedInNavigator):
3425         (WebInspector.ScriptsPanel.prototype._createDebugToolbar):
3426         * inspector/front-end/Settings.js:
3427         * inspector/front-end/TabbedPane.js:
3428         (WebInspector.TabbedPane.prototype.appendTab):
3429         (WebInspector.TabbedPane.prototype.selectTab):
3430         (WebInspector.TabbedPane.prototype.highlightLine):
3431         (WebInspector.TabbedPane.prototype.elementsToRestoreScrollPositionsFor):
3432         * inspector/front-end/UISourceCode.js:
3433         (WebInspector.UISourceCode.prototype.get domain):
3434         (WebInspector.UISourceCode.prototype.get folderName):
3435         (WebInspector.UISourceCode.prototype.get displayName):
3436         (WebInspector.UISourceCode.prototype._parseURL):
3437         * inspector/front-end/WebKit.qrc:
3438         * inspector/front-end/inspector.css:
3439         (.tabbed-pane):
3440         (.tabbed-pane-content):
3441         * inspector/front-end/inspector.html:
3442         * inspector/front-end/networkPanel.css:
3443         * inspector/front-end/scriptsPanel.css:
3444         (#scripts-navigator-resizer-widget):
3445         (.scripts-navigator-domain-tree-item .icon):
3446         (.scripts-navigator-folder-tree-item .icon):
3447         (.scripts-navigator-script-tree-item .icon):
3448         (.scripts.panel .navigator):
3449         (#scripts-navigator-tabbed-pane .tabbed-pane-header):
3450         (#scripts-navigator-tabbed-pane .tabbed-pane-content):
3451         (.scripts.panel .navigator li):
3452         (.scripts.panel .navigator :focus li.selected):
3453         (.scripts.panel .navigator li.selected .selection):
3454         (.scripts.panel .navigator :focus li.selected .selection):
3455         (.scripts.panel .navigator .icon):
3456         (.scripts.panel .base-navigator-tree-element-title):
3457         * inspector/front-end/treeoutline.js:
3458         (TreeOutline):
3459         (TreeOutline.prototype.appendChild):
3460
3461 2011-12-12  Andreas Kling  <kling@webkit.org>
3462
3463         CollectionCache: Remove unused copy constructor and make it noncopyable.
3464         <http://webkit.org/b/74378>
3465
3466         Reviewed by Simon Hausmann.
3467
3468         * html/CollectionCache.cpp:
3469         * html/CollectionCache.h:
3470
3471 2011-12-13  Jarred Nicholls  <jarred@sencha.com>
3472
3473         XHR should use m_responseTypeCode internally to be consistent with WebKit coding style
3474         https://bugs.webkit.org/show_bug.cgi?id=74330
3475
3476         Reviewed by Alexey Proskuryakov.
3477
3478         No new tests needed, no behavioral changes.
3479
3480         * xml/XMLHttpRequest.cpp:
3481         (WebCore::XMLHttpRequest::responseText):
3482         (WebCore::XMLHttpRequest::responseXML):
3483         (WebCore::XMLHttpRequest::responseBlob):
3484         (WebCore::XMLHttpRequest::didReceiveData):
3485         * xml/XMLHttpRequest.h:
3486         (WebCore::XMLHttpRequest::asBlob):
3487
3488 2011-12-13  Kentaro Hara  <haraken@chromium.org>
3489
3490         Use the [Supplemental] IDL for webaudio attributes in Chromium
3491         https://bugs.webkit.org/show_bug.cgi?id=73394
3492
3493         Reviewed by Adam Barth.
3494
3495         - Overview: Using the [Supplemental] IDL, this patch moves the attribute
3496         declarations of webaudio from DOMWindow.idl into a new IDL file
3497         webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
3498         feature (aka a module).
3499
3500         - This patch changes the build flow of WebCore.gyp as follows:
3501
3502             Previous build flow:
3503                 foreach $idl (all IDL files) {
3504                     generate-bindings.pl depends on $idl;
3505                     generate-bindings.pl reads $idl;
3506                     generate-bindings.pl generates .h and .cpp files for $idl;
3507                 }
3508
3509             New build flow (See the discussions in bug 72138 for more details):
3510                 resolve-supplemental.pl depends on all IDL files;
3511                 resolve-supplemental.pl reads all IDL files;
3512                 resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
3513                 resolve-supplemental.pl outputs supplemental_dependency.tmp;
3514                 foreach $idl (all IDL files) {
3515                     generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
3516                     generate-bindings.pl reads $idl;
3517                     generate-bindings.pl reads supplemental_dependency.tmp;
3518                     generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
3519                 }
3520
3521         - This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
3522         will be removed after build scripts for all platforms support the [Supplemental] IDL.
3523         The motivation for the [Supplemented] IDL is as follows:
3524
3525         In order to support the [Supplemental] IDL, we need to
3526         (1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
3527         (2) and run generate-bindings.pl with the supplemental_dependency.tmp.
3528
3529         This build flow requires a change on the following build scripts,
3530         but changing all the build scripts all at once without any regression is too difficult:
3531
3532             - DerivedSources.make
3533             - DerivedSources.pri
3534             - GNUmakefile.am
3535             - PlatformBlackBerry.cmake
3536             - UseJSC.cmake
3537             - UseV8.cmake
3538             - WebCore.vcproj/MigrateScripts
3539             - WebCore.vcproj/WebCore.vcproj
3540             - bindings/gobject/GNUmakefile.am
3541             - WebCore.gyp/WebCore.gyp
3542
3543         Thus, we are planning to change the build scripts one by one, which implies that
3544         we need to allow the temporary state in which some build scripts support [Supplemental] IDL
3545         but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
3546         The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
3547         in another IDL file somewhere, like this:
3548
3549             DOMWindowWebAudio.idl:
3550                 interface [
3551                     Supplemental=DOMWindow
3552                 ] DOMWindowWebAudio {
3553                     attribute attr1;
3554                     attribute attr2;
3555                 };
3556
3557             DOMWindow.idl:
3558                 interface [
3559                 ] DOMWindow {
3560                     attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
3561                     attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
3562                     attribute attr3;
3563                     attribute attr4;
3564                 };
3565
3566         Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:
3567
3568             - If a given build script supports the [Supplemental] IDL,
3569             generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
3570             - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
3571             as normal attributes and instead ignores all attributes with the [Supplemental] IDL
3572             (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).
3573
3574         Tests: webaudio/*
3575
3576         * WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
3577         * WebCore.gyp/scripts/action_derivedsourcesallinone.py:
3578         (main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp),
3579         which are described at the first column of each line in the input file.
3580         If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style
3581         path by the cygpath command.
3582         * WebCore.gypi: Added DOMWindowWebAudio.idl.
3583         * bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not
3584         support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead
3585         uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and
3586         instead uses the [Supplemental] IDL.
3587         Added the --additionalIdlFilesList option to specify the IDL files that are not listed in
3588         supplemental-dependency.tmp but should generate .h and .cpp files.
3589         * page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes.
3590         As I described above, the [Supplemented] IDL will be removed after all platforms support
3591         the [Supplemental] IDL.
3592         * webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL.
3593         The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.
3594
3595 2011-12-13  Yosifumi Inoue  <yosin@chromium.org>
3596
3597         RenderTheme should have a function for disabled text color adjustment
3598         https://bugs.webkit.org/show_bug.cgi?id=74143
3599
3600         Change disabledTextColor to private method.
3601
3602         Reviewed by Kent Tamura.
3603
3604         No new tests / existing tests cover this change.
3605
3606         * rendering/RenderThemeChromiumMac.h: Change disabledTextColor to private.
3607         * rendering/RenderThemeChromiumSkia.h: Change disabledTextColor to private.
3608
3609 2011-12-12  Daniel Bates  <dbates@webkit.org>
3610
3611         Unreviewed, rolling out r102656.
3612         http://trac.webkit.org/changeset/102656
3613         https://bugs.webkit.org/show_bug.cgi?id=74313
3614
3615         Broke the Mac, Windows and WinCairo builds. We need to look
3616         into this patch some more.
3617
3618         * bindings/js/ScriptEventListener.cpp:
3619         (WebCore::eventListenerHandlerLocation):
3620
3621 2011-12-12  Konrad Piascik  <kpiascik@rim.com>
3622
3623         2011-12-12  Konrad Piascik  <kpiascik@rim.com>
3624
3625         Implement the JavaScriptCore bindings for eventListenerHandlerLocation
3626         https://bugs.webkit.org/show_bug.cgi?id=74313
3627
3628         Reviewed by Geoffrey Garen.
3629
3630         Open any page in Web Inspector and look at the event listeners. They should now
3631         link to the script which created them.
3632
3633         * bindings/js/ScriptEventListener.cpp:
3634         (WebCore::eventListenerHandlerLocation):
3635
3636 2011-12-12  Yosifumi Inoue  <yosin@chromium.org>
3637
3638         RenderTheme should have a function for disabled text color adjustment
3639         https://bugs.webkit.org/show_bug.cgi?id=74143
3640
3641         Reviewed by Kent Tamura.
3642
3643         No new tests / existing tests cover this change.
3644
3645         * rendering/RenderTextControl.cpp:
3646         (WebCore::RenderTextControl::adjustInnerTextStyle): Use RenderTheme::disabledTextColor instead of PLATFORM wraped static function. 
3647         * rendering/RenderTheme.cpp:
3648         (WebCore::RenderTheme::disabledTextColor): Moved from RenderTextControl.cpp. This method implements for non-Chromium color.
3649         * rendering/RenderTheme.h: Add new virtual method disabledTextColor.
3650         * rendering/RenderThemeChromiumMac.h: Implementation of RenderTheme::disabledTextColor for Chrimium Mac.
3651         * rendering/RenderThemeChromiumSkia.h: Implementation of RenderTheme::disabledTextColor for Chrimium.
3652
3653 2011-12-12  Kenneth Russell  <kbr@google.com>
3654
3655         Unreviewed, rolling out r102648.
3656         http://trac.webkit.org/changeset/102648
3657         https://bugs.webkit.org/show_bug.cgi?id=74313
3658
3659         Broke the Snow Leopard and Windows builds
3660
3661         * bindings/js/ScriptEventListener.cpp:
3662         (WebCore::eventListenerHandlerLocation):
3663
3664 2011-12-12  Andreas Kling  <kling@webkit.org>
3665
3666         Resizing Cappuccino is very laggy on WebKit since Safari 5.1
3667         <http://webkit.org/b/71354> and <rdar://problem/10565998>
3668
3669         Reviewed by Anders Carlsson.
3670
3671         * WebCore.exp.in: Export FloatPoint(const NSPoint&)
3672
3673 2011-12-12  Jarred Nicholls  <jarred@sencha.com>
3674
3675         [Qt] QTKIT-based video support must target OS X 10.5 or higher
3676         https://bugs.webkit.org/show_bug.cgi?id=74294
3677
3678         WebCore on OS X Lion fails to build when QTKIT video support is enabled, unless a
3679         deployment target of 10.5+ is specified explicitly.
3680
3681         Reviewed by Noam Rosenthal.
3682
3683         No new tests as this is a build issue.
3684
3685         * Target.pri:
3686
3687 2011-12-12  Luke Macpherson   <macpherson@chromium.org>
3688
3689         Implement CSS text-decoration property in CSSStyleApplyProperty.
3690         https://bugs.webkit.org/show_bug.cgi?id=74258
3691
3692         Reviewed by Andreas Kling.
3693
3694         No new tests / refactoring only.
3695
3696         * css/CSSStyleApplyProperty.cpp:
3697         (WebCore::ApplyPropertyTextDecoration::applyValue):
3698         (WebCore::ApplyPropertyTextDecoration::createHandler):
3699         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3700         * css/CSSStyleSelector.cpp:
3701         (WebCore::CSSStyleSelector::applyProperty):
3702
3703 2011-12-12  Adrienne Walker  <enne@google.com>
3704
3705         iframe fails to scroll in composited page
3706         https://bugs.webkit.org/show_bug.cgi?id=72682
3707
3708         Reviewed by Simon Fraser.
3709
3710         FrameView::scrollContentsSlowPath only was catching the case where a
3711         child iframe had a composited parent. Now detect if the child iframe
3712         has any composited ancestor.
3713
3714         Test: compositing/iframes/scroll-grandchild-iframe.html
3715
3716         * page/FrameView.cpp:
3717         (WebCore::FrameView::scrollContentsSlowPath):
3718
3719 2011-12-12  Konrad Piascik  <kpiascik@rim.com>
3720
3721         Implement the JavaScriptCore bindings for eventListenerHandlerLocation
3722         https://bugs.webkit.org/show_bug.cgi?id=74313
3723
3724         Reviewed by Geoffrey Garen. 
3725
3726         Open any page in Web Inspector and look at the event listeners. They should now
3727         link to the script which created them.
3728
3729         * bindings/js/ScriptEventListener.cpp:
3730         (WebCore::eventListenerHandlerLocation):
3731
3732 2011-12-12  Erik Arvidsson  <arv@chromium.org>
3733
3734         [V8] CodeGeneratorV8.pm does not correctly work with inherited HasIndexGetter
3735         https://bugs.webkit.org/show_bug.cgi?id=74027
3736
3737         Reviewed by Adam Barth.
3738
3739         Instead of having to write a custom indexer when the interface has an inherited indexer
3740         we get the signature from the super interface.
3741
3742         Tested by existing tests.
3743
3744         * Target.pri: Remove V8DOMSettableTokenListCustom.cpp and V8WebKitCSSFilterValueCustom.cpp.
3745         * UseV8.cmake: Ditto.
3746         * WebCore.gypi: Ditto.
3747         * bindings/scripts/CodeGenerator.pm:
3748         (FindSuperMethod): Returns the first matching function in one of the ancestor interfaces.
3749         * bindings/scripts/CodeGeneratorV8.pm:
3750         (GenerateImplementationIndexer): If the current interface has no indexer try to find an
3751                                          indexer in one of the super interfaces.
3752         (GenerateImplementationNamedPropertyGetter): Ditto for named property getter.
3753         * bindings/v8/custom/V8DOMSettableTokenListCustom.cpp: Removed.
3754         * bindings/v8/custom/V8WebKitCSSFilterValueCustom.cpp: Removed.
3755
3756 2011-12-12  Simon Fraser  <simon.fraser@apple.com>
3757
3758         Make it possible to substitute a different CALayer implementation for the main root layer
3759         https://bugs.webkit.org/show_bug.cgi?id=74369
3760
3761         Reviewed by Anders Carlsson.
3762         
3763         Some platforms may wish to have the main root layer (which corresponds with
3764         the main frame's RenderView's layer) implemented by a custom platform layer,
3765         for example to contain a cache of tiles.
3766         
3767         Make this possible on Mac by adding a new method to GraphicsLayerClient(),
3768         and implementing it in RenderLayerBacking. This new behavior is not yet enabled.
3769         
3770         Also clean up some WebLayer/WebTiledLayer code.
3771
3772         * WebCore.xcodeproj/project.pbxproj:
3773         * platform/graphics/GraphicsLayerClient.h:
3774         (WebCore::GraphicsLayerClient::shouldUseTileCache): New client method that indicates that the GraphicsLayer
3775         should host a tile cache layer instead of a normal layer.
3776         * platform/graphics/ca/GraphicsLayerCA.cpp:
3777         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Ask the client, if any, whether to create a tile cache layer.
3778         * platform/graphics/ca/PlatformCALayer.h:
3779         * platform/graphics/ca/mac/PlatformCALayerMac.mm: NSClassFromString(@"CATransformLayer") was for Leopard;
3780         we can just use the classname now. Handle LayerTypeTileCacheLayer.
3781         (PlatformCALayer::PlatformCALayer):
3782         * platform/graphics/ca/mac/WebTileCacheLayer.h: Copied from Source/WebCore/platform/graphics/mac/WebLayer.h.
3783         * platform/graphics/ca/mac/WebTileCacheLayer.mm: Copied from Source/WebCore/platform/graphics/mac/WebLayer.h.
3784         * platform/graphics/mac/WebLayer.h: Remove the setLayerNeedsDisplayInRect() hackery.
3785         * platform/graphics/mac/WebLayer.mm: setLayerNeedsDisplayInRect() tried to share code between WebLayer and WebTiledLayer
3786         by using Obj-C runtime methods to find the superclass. This causes infinite recursion if Web[Tiled]Layer is subclassed,
3787         so remove it.
3788         (-[WebLayer setNeedsDisplayInRect:]): Code moved here from setLayerNeedsDisplayInRect.
3789         * platform/graphics/mac/WebTiledLayer.mm:
3790         (-[WebTiledLayer setNeedsDisplayInRect:]): Code copied here from setLayerNeedsDisplayInRect.
3791         * rendering/RenderLayerBacking.cpp:
3792         (WebCore::RenderLayerBacking::RenderLayerBacking): Find out, and cache if we're the main frame's layer.
3793         (WebCore::RenderLayerBacking::shouldUseTileCache): Return m_usingTiledCacheLayer, which is always false for now.
3794         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Use m_isMainFrameRenderViewLayer.
3795         (WebCore::RenderLayerBacking::paintingGoesToWindow): The tile cache layer needs to paint itself.
3796         * rendering/RenderLayerBacking.h:
3797         * rendering/RenderLayerCompositor.h: m_compositeForFixedPosition was unused.
3798
3799 2011-12-12  Ryosuke Niwa  <rniwa@webkit.org>
3800
3801         REGRESSION(r102357): respondToUnappliedEditing exits early for CreateLinkCommand
3802         https://bugs.webkit.org/show_bug.cgi?id=74356
3803
3804         Reviewed by Enrica Casucci.
3805
3806         The problem was that isCreateLinkCommand was called on EditCommandComposition by respondToUnappliedEditing.
3807         Fixed the bug by propagating the value of isCreteLinkCommand from CompositeEditCommand to
3808         EditCommandComposition via wasCreateLinkCommand.
3809
3810         Also move isCreateLinkCommand from EditCommand to CompositeEditCommand to prevent this mistake in the future.
3811
3812         * editing/CompositeEditCommand.cpp:
3813         (WebCore::EditCommandComposition::create):
3814         (WebCore::EditCommandComposition::EditCommandComposition):
3815         (WebCore::CompositeEditCommand::ensureComposition):
3816         (WebCore::CompositeEditCommand::isCreateLinkCommand):
3817         * editing/CompositeEditCommand.h:
3818         (WebCore::EditCommandComposition::wasCreateLinkCommand):
3819         * editing/SpellingCorrectionController.cpp:
3820         (WebCore::SpellingCorrectionController::respondToUnappliedEditing):
3821         * editing/SpellingCorrectionController.h:
3822
3823 2011-12-12  Mihnea Ovidenie  <mihnea@adobe.com>
3824
3825         [CSSRegions]Revert RenderObject::style() to its state before region styling
3826         https://bugs.webkit.org/show_bug.cgi?id=74315
3827
3828         Reviewed by Tony Chang.
3829
3830         * rendering/RenderObject.h:
3831         (WebCore::RenderObject::style):
3832
3833 2011-12-12  Adam Klein  <adamk@chromium.org>
3834
3835         Don't crash in StyleAttributeMutationScope if the style declaration's element has been GCed
3836         https://bugs.webkit.org/show_bug.cgi?id=74321
3837
3838         Reviewed by Ryosuke Niwa.
3839
3840         In r101101, Rafael Weinstein added code to CSSMutableStyleDeclaration.cpp
3841         which depended on isInlineStyleDeclaration returning true iff the
3842         element it pointed to was non-null (it will be nulled-out if the
3843         element is garbage collected).
3844
3845         Then, in r101172, Andreas Kling changed the semantics so that
3846         isInlineStyleDeclaration only described the type of the declaration,
3847         not the state of the related element.
3848
3849         This change updates Rafael's code with an explicit check that the
3850         element is still alive.
3851
3852         Test: fast/dom/css-inline-style-declaration-crash.html
3853
3854         * css/CSSMutableStyleDeclaration.cpp:
3855
3856 2011-12-12  Chris Fleizach  <cfleizach@apple.com>
3857
3858         AX: aria-hidden inheritance broken when applying to some descendants
3859         https://bugs.webkit.org/show_bug.cgi?id=73940
3860
3861         Reviewed by Darin Adler.
3862
3863         When adding children, we were not updating the children cache for direct AX descendants.
3864         This meant that toggling aria-hidden could result in a stale cache where elements would not be reachable.
3865
3866         Making this fix also exposed a problem in AccessibilityTable where the AccessibilityHeaderObject was not
3867         being managed correctly as a mock element.
3868
3869         Test: platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements.html
3870
3871         * accessibility/AccessibilityRenderObject.cpp:
3872         (WebCore::AccessibilityRenderObject::addChildren):
3873         * accessibility/AccessibilityTable.cpp:
3874         (WebCore::AccessibilityTable::clearChildren):
3875         (WebCore::AccessibilityTable::headerContainer):
3876         * accessibility/AccessibilityTable.h:
3877
3878 2011-12-12  Jeremy Apthorp  <jeremya@chromium.org>
3879
3880         When the mouse is dragged out of an :active element, it should lose :hover.
3881         https://bugs.webkit.org/show_bug.cgi?id=57206
3882
3883         Reviewed by Ryosuke Niwa.
3884
3885         Test: fast/css/hover-active-drag.html
3886
3887         * page/EventHandler.cpp:
3888         (WebCore::EventHandler::handleMouseMoveEvent): Don't mark mouse-drag hit tests read-only, since they no longer are.
3889         (WebCore::EventHandler::dragSourceEndedAt): Send a hit test request when the mouse goes up after a drag, so
3890         RenderLayer has a chance to update the hover/active status.
3891         * rendering/RenderLayer.cpp:
3892         (WebCore::RenderLayer::updateHoverActiveState): Only allow the :active state to change on mouse down or mouse up.
3893
3894 2011-12-12  Kenneth Russell  <kbr@google.com>
3895
3896         Unreviewed Windows build fix after http://trac.webkit.org/changeset/102619 .
3897         Remove OVERRIDE specifier from virtual destructor.
3898
3899         * html/HTMLPlugInImageElement.h:
3900
3901 2011-12-12  Ryosuke Niwa  <rniwa@webkit.org>
3902
3903         WebKit code shouldn't be calling applyCommand directly
3904         https://bugs.webkit.org/show_bug.cgi?id=74337
3905
3906         Reviewed by Darin Adler.
3907
3908         Make WebKit-layer code call Editor::replaceSelectionWithFragment and Editor::replaceSelectionWithText
3909         instead of manually creating and applying ReplaceSelectionCommand.
3910
3911         The only behavioral difference is that new code will end up checking for spell checks. However, this
3912         difference appears to be unintentional since the code predates http://trac.webkit.org/changeset/73886,
3913         which introduced an invocation of spellcheck code.
3914
3915         Unfortunately no tests since there doesn't seem to be anyway to test this change.
3916
3917         * WebCore.exp.in:
3918         * editing/EditCommand.cpp:
3919         (WebCore::applyCommand):
3920         * editing/EditCommand.h:
3921         * editing/Editor.h:
3922
3923 2011-11-26  Adam Barth  <abarth@webkit.org>
3924
3925         Remove platform/audio/fftw
3926         https://bugs.webkit.org/show_bug.cgi?id=73163
3927
3928         Reviewed by Eric Seidel.
3929
3930         The FFTW library is GPL, not LGPL, like WebKit.  This patch removes the
3931         integration with the library so folks who use WebAudio don't
3932         accidentially violate the GPL by linking in FFTW.
3933
3934         * GNUmakefile.am:
3935         * WebCore.gyp/WebCore.gyp:
3936         * WebCore.gypi:
3937         * platform/audio/FFTFrame.h:
3938         * platform/audio/FFTFrameStub.cpp:
3939         * platform/audio/fftw: Removed.
3940         * platform/audio/fftw/FFTFrameFFTW.cpp: Removed.
3941
3942 2011-12-12  Kenneth Russell  <kbr@google.com>
3943
3944         COMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows
3945         https://bugs.webkit.org/show_bug.cgi?id=74327
3946
3947         Unreviewed build fix. True fix should follow under above bug.
3948
3949         * css/CSSStyleSelector.cpp:
3950
3951 2011-12-12  David Grogan  <dgrogan@chromium.org>
3952
3953         Fix compilation error when !ENABLE(WORKERS)
3954         https://bugs.webkit.org/show_bug.cgi?id=74029
3955
3956         Reviewed by Yury Semikhatsky.
3957
3958         * storage/IDBFactory.cpp:
3959         (WebCore::IDBFactory::open): add #if ENABLE(WORKERS) guard
3960
3961 2011-12-12  Brady Eidson  <beidson@apple.com>
3962
3963         Page cache should support pages with plugins.
3964         <rdar://problem/5190122> and https://bugs.webkit.org/show_bug.cgi?id=13634
3965
3966         Reviewed by Anders Carlsson.
3967
3968         By making plugin elements renderers go display:none when entering the page cache,
3969         we destroy the plug-in in a cross platform way as well as handle invalidating script
3970         objects created by that plugin.
3971
3972         By restoring the original style when leaving the page cache and forcing a style recalc
3973         on the plugin element, the plugin is gracefully reinstantiated when the user goes back.
3974
3975         Test: plugins/netscape-plugin-page-cache-works.html
3976
3977         * dom/Document.cpp:
3978         (WebCore::Document::documentDidBecomeActive): Copy this collection before iterating over
3979           it, as the callbacks might result in mutating the set.
3980
3981         * dom/Node.h:
3982         (WebCore::Node::setHasCustomStyleForRenderer):
3983         (WebCore::Node::clearHasCustomStyleForRenderer): Expose the ability to stop using a 
3984           custom renderer and go back to the default renderer.
3985
3986         * history/CachedFrame.cpp:
3987         (WebCore::CachedFrame::CachedFrame): Move the document inactivation call to the same place
3988           we suspend active DOM objects. It is important this call be *after* the beforeunload event
3989           is dispatched, and was coincidental non of the elements that using Document activation
3990           had run in to this problem yet.
3991
3992         * history/PageCache.cpp:
3993         (WebCore::logCanCacheFrameDecision):
3994         (WebCore::PageCache::canCachePageContainingThisFrame): If the page contains plugins but
3995           the PageCacheSupportsPlugins setting is true, allow this page.
3996
3997         Kill and recreate the plugin by listening for Document activation callbacks and setting a custom
3998         display:none render style:
3999         * html/HTMLPlugInImageElement.cpp:
4000         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
4001         (WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement): Unregister for document activation
4002           callbacks.
4003         (WebCore::HTMLPlugInImageElement::createRenderer): Once a renderer (ie. plugin instance) is
4004           created, this element needs Document (in)activation callbacks.
4005         (WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument): Manage Document activation 
4006           callback registration.
4007         (WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument): Ditto.
4008         (WebCore::HTMLPlugInImageElement::documentWillBecomeInactive): Clone the element's current style
4009           and set the clone's display value to None. Start using this custom style and force a style
4010           recall. This destroys the renderer and therefore the plugin instance.
4011         (WebCore::HTMLPlugInImageElement::documentDidBecomeActive): Stop using the custom style and
4012           force a style recall to reinstantiate the plugin.
4013         (WebCore::HTMLPlugInImageElement::customStyleForRenderer): Return the stand-in style that has
4014           display:none set.
4015         * html/HTMLPlugInImageElement.h:
4016
4017         Add a setting that allows runtime configuration of whether or not the page cache supports plugins:
4018         * page/Settings.cpp:
4019         (WebCore::Settings::Settings):
4020         * page/Settings.h:
4021         (WebCore::Settings::setPageCacheSupportsPlugins):
4022         (WebCore::Settings::pageCacheSupportsPlugins):
4023
4024 2011-12-12  Ojan Vafai  <ojan@chromium.org>
4025
4026         r102234 caused RuleData to use 33 bits in its bitmask
4027         https://bugs.webkit.org/show_bug.cgi?id=74314
4028
4029         Reviewed by Antti Koivisto.
4030
4031         Lower m_position to something more reasonable. A million
4032         should be plenty. Current large sites (e.g. gmail) seem to use
4033         tens of thousands.
4034
4035         Added a COMPILE_ASSERT to ensure this doesn't regress.
4036
4037         No new tests.
4038
4039         * css/CSSStyleSelector.cpp:
4040
4041 2011-12-12  James Robinson  <jamesr@chromium.org>
4042
4043         Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change
4044         https://bugs.webkit.org/show_bug.cgi?id=74231
4045